Back to File Organization

Oak National Academy

Lessons written by expert teachers in England, each with slides, a video and quizzes.

Their topic:
Databases and SQL · Programming: dictionaries and data files
For your topic:
File Organization · Data Processing

Use these lessons alongside our lesson note, which covers your syllabus in full.

What this covers in your syllabus

2 lessons from Oak National Academy

Lesson 1 of 2 · GCSE level, ages 14 to 16

Builds the basics this topic needs

Database fundamentals

By the end: I can describe the difference between a flat file and relational database.

Key learning points

  1. Data is fundamental to any computer system.
  2. With data comes the need for a system that is able to store, sort, and search through it.
  3. A database is an organised collection of data.
  4. Databases can be as simple as a single file, and as complex as a set of related tables, each with fields and keys.

Keywords

record
a data structure that stores related fields of data for a single object or being
field
the part of a record which are the category headings for data in a table sometimes called an attribute
primary key
an attribute that uniquely identifies a record in a database table
foreign key
an attribute in one table that is the primary key in another table and is used to link the tables together

A common mistake

Mistake: A primary key and a foreign key are the same thing.

In fact: A primary key is an attribute that uniquely identifies a record in a database table, whereas a foreign key is an attribute in one table that is the primary key in another table and is used to link the tables together.

Check what you learned

From Oak National Academy's exit quiz. Choose every answer that is right.

What is a record in a database?
What is the main advantage of using a relational database over a flat file database?

A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0. Read the licence

Lesson 2 of 2 · GCSE level, ages 14 to 16

Builds the basics this topic needs

Reading CSV files

By the end: I can read and structure data in a CSV file.

Key learning points

  1. CSV text files group data together on individual lines and separates values in these groups by commas.
  2. CSV files can be read by a range of different spreadsheet software packages as well as Python files.
  3. Each item is seperated by a comma, each record is seperated over a new row in the file.
  4. A CSV file is the same as any other text file where each row is stored as string.

Keywords

CSV
comma-separated values are a plaintext data file where each value is separated by a single comma
tabular
displaying data in a grid of rows and columns
strip()
a Python method which removes any leading, and trailing whitespaces or characters that you specify
split()
a Python method which is used to break a string into a list based on a specified delimiter

A common mistake

Mistake: It is not possible to interrogate a CSV file in Python without importing a specialised library.

In fact: A CSV file behaves in the same way as a txt file in Python. Data is read from the file as strings and methods can be used to remove extra characters like commas, spliting the values either side in to separate items.

Check what you learned

From Oak National Academy's exit quiz. Choose every answer that is right.

What does CSV stand for?
Which Python method is used to remove leading and trailing spaces from a string?
What type of structure does a CSV file follow?
Which Python method is used to break a string based on a specific delimiter?

A computing lesson by Oak National Academy licensed under the Open Government Licence (OGL) v3.0. Read the licence

The wording comes from each publisher. The layout and the links to your syllabus are ours.