Cambridge Lower Secondary CheckpointStage 9

Managing Data

Computing Stage 9 Chapter Notes

What this chapter covers

Managing Data
ShareWhatsAppPost
Managing Data notes

Unable to load PDF

The notes viewer could not load. Please refresh the page.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Managing Data notes as text: skim, search, and jump between subtopics.

~14 min read

1. Fundamentals of Data Management

Data management involves organising, storing, and maintaining data. A collection of related data is called a dataset. This data is typically stored in tables, which are structured with columns and rows. Each column represents a field (a single piece of information, like 'First Name'), and each row represents a record (a complete set of information for one item, like a single person). To ensure data integrity and prevent duplication, a primary key is used. This is a unique identifier for each record in a table, like a 'StudentID' number. Protecting this data is crucial, as it often contains private information that organisations have a legal responsibility to keep secure.

Key term

Primary Key: A field in a table that uniquely identifies each record, ensuring no two records are identical.

Examiner insight

Examiners expect you to justify your choice of primary key by explaining why it is unique and why other fields are unsuitable.

Common pitfall

Confusing a record (a whole row of data for one entity) with a field (a single piece of data in a column).

Worked example 13 marks

The table below shows data for a local library. Identify the fields, one complete record, and suggest a suitable primary key.

  1. 1
    1. Identify the Fields: The fields are the column headings, which are 'MemberID', 'FirstName', 'LastName', and 'Postcode'.
  2. 2
    1. Identify a Record: A record is a single row of data. For example, the first record is ('LIB001', 'Anika', 'Sharma', 'SW1A 0AA').
  3. 3
    1. Suggest a Primary Key: The 'MemberID' field is the most suitable primary key. Each member has a unique ID ('LIB001', 'LIB002', etc.), whereas names or postcodes could be duplicated for different members.

Recap

  • A dataset is a collection of related data.
  • Data is organised into tables made of fields (columns) and records (rows).
  • A field is a single attribute, while a record is a complete entry for one item.
  • A primary key is a unique identifier for each record in a table.
  • Organisations must keep personal data secure to protect privacy.

Quick check

  1. What is the difference between a field and a record?2 marks
  2. Why is a person's name not always a good choice for a primary key?1 mark

2. Spreadsheet Functions for Data Analysis

Spreadsheets are powerful tools for modelling real-life situations and analysing data. They use a grid of cells, and you can perform calculations using formulas and functions. A function is a pre-built formula that simplifies complex calculations. Key functions for data analysis include:

  • MIN: Finds the smallest value in a range of cells.
  • MAX: Finds the largest value in a range of cells.
  • COUNT: Counts the number of cells in a range that contain numbers.
  • AVERAGE: Calculates the average of the numbers in a range.
  • IF: Performs a logical test and returns one value if the test is true, and another if it's false. This is great for making decisions in your data.

=MIN(range)

=MAX(range)

=COUNT(range)

=AVERAGE(range)

=IF(logical_test, value_if_true, value_if_false)

Key term

Function: A predefined formula in a spreadsheet application that performs a specific calculation using given values, called arguments.

Examiner insight

Marks are often awarded for using the correct cell references (e.g., B2:B21) and understanding the exact syntax of each function, especially the order of arguments in the IF function.

Common pitfall

Forgetting to put text values inside double quotes in an IF function, for example using =IF(A1>10, Pass, Fail) instead of =IF(A1>10, "Pass", "Fail").

Worked example 13 marks

A teacher has a spreadsheet with student test scores out of 100 in column B, from cell B2 to B21. Write the formulas to do the following:a) In cell D1, find the lowest score.b) In cell D2, find the highest score.c) In cell D3, assign a 'Pass' grade if the score in B2 is 50 or more, and 'Fail' otherwise.

  1. 1

    a) To find the lowest score in the range B2:B21, use the MIN function. Formula for D1: =MIN(B2:B21)

  2. 2

    b) To find the highest score in the range B2:B21, use the MAX function. Formula for D2: =MAX(B2:B21)

  3. 3

    c) To assign a grade based on the score in B2, use the IF function. The logical test is B2>=50. If true, it returns 'Pass'. If false, it returns 'Fail'. Formula for D3: =IF(B2>=50, "Pass", "Fail")

Recap

  • Spreadsheets use functions to perform calculations on data.
  • The MIN function finds the lowest value in a range.
  • The MAX function finds the highest value in a range.
  • The COUNT function counts cells containing numbers.
  • The IF function allows for decision-making based on a logical test.

Quick check

  1. Write the spreadsheet formula to count how many numbers are in cells C5 through C25.1 mark
  2. What are the three parts (arguments) of an IF function?3 marks

3. Designing Relational Databases

While a single table is useful, most real-world data is more complex. A relational database stores data across multiple linked tables to reduce data duplication and improve consistency. The link between tables is created using keys. Each table has a primary key that uniquely identifies its records. To link another table to it, you include the primary key from the first table as a field in the second table. In this second table, that field is called a foreign key. For example, a 'Students' table (with Primary Key 'StudentID') can be linked to an 'Enrolments' table. The 'Enrolments' table would contain a 'StudentID' field as a foreign key, linking each enrolment record to a specific student.

Key term

Foreign Key: A field in one table that is the primary key of another table, used to create a link between the two tables.

Fun fact

The relational model is so effective that it has remained the dominant model for databases for over 50 years, even with the rise of the internet and Big Data.

Worked example 14 marks

A vet clinic wants a database. They need to store details about pets and their owners. They have created two tables: 'Owners' and 'Pets'. The 'Owners' table has fields: OwnerID (Primary Key), OwnerName, PhoneNumber. The 'Pets' table has fields: PetID (Primary Key), PetName, Breed, OwnerID. Explain how these two tables are related.

  1. 1
    1. Identify the keys: The primary key of the 'Owners' table is 'OwnerID'. The primary key of the 'Pets' table is 'PetID'.
  2. 2
    1. Identify the link: The 'Pets' table also contains a field called 'OwnerID'. This field is the foreign key.
  3. 3
    1. Explain the relationship: The 'OwnerID' foreign key in the 'Pets' table links each pet record to a specific owner record in the 'Owners' table. This creates a one-to-many relationship: one owner can have many pets, but each pet belongs to only one owner in this model. This avoids repeating the owner's name and phone number for every pet they own.

Recap

  • Relational databases use multiple linked tables to organise data efficiently.
  • Data duplication is minimised by storing related information in separate tables.
  • A primary key uniquely identifies records within its own table.
  • A foreign key is a primary key from one table placed into another to form a link.
  • Relationships between tables allow for complex and powerful data queries.

Quick check

  1. What is the main purpose of using a foreign key in a database design?1 mark
  2. In a school database, which table would a 'StudentID' foreign key likely be found in: 'Students' or 'ExamResults'?1 mark

4. Complex Database Queries

A query is a way of asking a database a question to retrieve specific information. While simple queries use a single criterion (e.g., 'find all students in Year 9'), complex queries allow for more detailed searches. You can use logical operators like AND and OR to combine multiple criteria. 'AND' narrows a search (e.g., 'find students in Year 9 AND in house 'Turing''), requiring all conditions to be met. 'OR' broadens a search (e.g., 'find students in Year 9 OR Year 10'), requiring only one condition to be met. You can also perform queries across linked tables (a 'join') to combine information, for example, finding the names of all customers who have placed an order for a specific product.

SELECT ... FROM ... WHERE condition1 AND condition2;

SELECT ... FROM ... WHERE condition1 OR condition2;

SELECT Table1.FieldA, Table2.FieldB FROM Table1 JOIN Table2 ON Table1.PK = Table2.FK WHERE ...

Key term

Query: A request made to a database management system to retrieve, insert, update, or delete data based on specified criteria.

Examiner insight

Examiners look for a clear understanding of how to combine criteria with logical operators and how to identify the need to access more than one table to answer a question.

Common pitfall

Using AND when OR is needed, or vice-versa. For example, searching for 'Country = France AND Country = Spain' will always return zero results, as a single record cannot have both values.

Worked example 13 marks

Using the 'Owners' and 'Pets' tables from the previous topic, describe the query needed to find the names of all pets that are dogs AND belong to the owner with OwnerID 'O-1138'.

  1. 1
    1. Identify the tables: You need information from the 'Pets' table (PetName, Breed) and potentially the 'Owners' table (though the OwnerID is in the Pets table).
  2. 2
    1. Identify the criteria: There are two criteria. First, the 'Breed' must be 'Dog'. Second, the 'OwnerID' must be 'O-1138'.
  3. 3
    1. Combine the criteria: Since both conditions must be true, you need to use the AND operator.
  4. 4
    1. Formulate the query: The query would select the 'PetName' from the 'Pets' table where the 'Breed' field is equal to 'Dog' AND the 'OwnerID' field is equal to 'O-1138'.

Worked example 24 marks

Describe a query to find the names of all owners ('OwnerName') who have a cat.

  1. 1
    1. Identify the tables: You need 'OwnerName' from the 'Owners' table and 'Breed' from the 'Pets' table.
  2. 2
    1. Join the tables: The tables must be joined on the 'OwnerID' field, which is common to both.
  3. 3
    1. Specify the criterion: The search criterion is that the 'Breed' in the 'Pets' table must be 'Cat'.
  4. 4
    1. Formulate the query: The query would select 'OwnerName' by joining the 'Owners' and 'Pets' tables on 'OwnerID', and then filtering the results for records where the 'Breed' is 'Cat'.

Recap

  • Complex queries use multiple criteria to refine search results.
  • The AND operator is used when all specified conditions must be met.
  • The OR operator is used when at least one of the specified conditions must be met.
  • A JOIN operation is used to combine rows from two or more tables based on a related column.
  • Queries on relational databases can retrieve combined information from multiple tables.

Quick check

  1. To find library books that are either 'Fiction' or 'Paperback', would you use AND or OR?1 mark

5. Choosing the Right Tool: Spreadsheets vs. Databases

Both spreadsheets and databases manage data, but they are designed for different purposes. A spreadsheet is best for smaller, simpler datasets, numerical analysis, calculations, and creating charts. It's a single-user-focused tool ideal for tasks like creating a personal budget or tracking grades for a single class. A database, however, is designed to handle large volumes of structured data efficiently. It excels at ensuring data integrity, handling multiple users accessing the data simultaneously, and managing complex relationships between data. For a large organisation like an online store or a school, a database is essential to prevent data entry errors, manage security, and handle thousands of records consistently.

Key term

Data Integrity: The maintenance and assurance of the accuracy and consistency of data over its entire life-cycle.

Examiner insight

High-scoring answers provide a clear choice and then justify it by applying specific features of spreadsheets and databases to the given scenario.

Common pitfall

Simply stating one tool is 'better' without relating the choice to the specific needs of the scenario, such as data size, number of users, or data complexity.

Worked example 15 marks

A new online learning platform is being developed for a school. It needs to store student details, course information, and grades. Should the developers use a spreadsheet or a database? Justify your answer with two reasons.

  1. 1
    1. Choice: The developers should use a database.
  2. 2
    1. Justification 1 (Data Volume & Complexity): A school has many students, courses, and grades. This data is related (students enrol in courses, get grades). A relational database is designed to handle these large volumes of interconnected data far more efficiently than a spreadsheet.
  3. 3
    1. Justification 2 (Multi-user Access & Security): Many users (teachers, students, administrators) will need to access and update the data simultaneously. Databases are built to handle concurrent access safely, preventing data corruption. They also offer robust security features to control who can see or change specific data, which is crucial for sensitive student records.

Recap

  • Spreadsheets are best for single users, small datasets, and calculations.
  • Databases are designed for large datasets, multiple users, and complex relationships.
  • Databases provide better data integrity, security, and scalability than spreadsheets.
  • The choice of tool depends on the volume of data, number of users, and complexity of the task.
  • For large, shared, important datasets, a database is almost always the correct choice.

Quick check

  1. A scientist is tracking the daily growth of 15 plants in a lab for a month. Would a spreadsheet or a database be more appropriate?1 mark
  2. Give one reason why a database is better for managing an airline's booking system.1 mark

6. Understanding Big Data

Big Data refers to datasets that are so large and complex that they are difficult to manage with traditional data processing tools. The concept is often described by the '3 Vs':

  1. Volume: The sheer amount of data being generated and stored. This can be terabytes or even petabytes of information from sources like social media, scientific experiments, or smart devices.
  2. Velocity: The incredible speed at which new data is generated and needs to be processed. For example, social media feeds are constantly updating, and stock market data changes every second.
  3. Variety: The different types of data being collected. This includes structured data (like in a database table), semi-structured data (like an XML file), and unstructured data (like text, images, videos, and audio). Organisations analyse Big Data to find patterns, trends, and associations, especially relating to human behaviour and interactions.

Key term

Big Data: Extremely large datasets that may be analysed computationally to reveal patterns, trends, and associations, especially relating to human behaviour and interactions.

Fun fact

The Large Hadron Collider (LHC) at CERN is one of the biggest Big Data generators, producing about 90 petabytes (90 million gigabytes) of data per year from its particle collision experiments.

Worked example 16 marks

A global streaming service collects data on what its 200 million users watch, when they watch, what device they use, and whether they 'like' a show. Explain how this is an example of Big Data using the '3 Vs'.

  1. 1
    1. Volume: With 200 million users, the amount of data collected every second is enormous. Storing viewing history, preferences, and interaction data for every user results in a massive volume of data.
  2. 2
    1. Velocity: The data is generated in real-time. Every time a user plays, pauses, searches for, or 'likes' a video, new data is created instantly. The system must process this high-velocity data stream to make immediate recommendations.
  3. 3
    1. Variety: The data collected is diverse. It includes structured data (like UserID, AccountType), semi-structured data (logs of activity), and unstructured data (user reviews or feedback). Analysing this variety helps the service understand user behaviour comprehensively.

Recap

  • Big Data is defined by datasets too large and complex for traditional tools.
  • Volume refers to the immense scale of the data.
  • Velocity refers to the high speed at which data is created and processed.
  • Variety refers to the different formats of data, from structured tables to unstructured video.
  • Organisations use Big Data analysis to gain insights and make better decisions.

Quick check

  1. What does 'Variety' mean in the context of Big Data? Give one example of unstructured data.2 marks
  2. Which of the '3 Vs' relates to the speed of data generation?1 mark

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. Explain the difference between a primary key and a foreign key, and describe how they work together to create a relationship between two tables.4 marks
  2. A spreadsheet contains a list of product prices in cells C2 to C50. Write the formulas to be placed in cell F1 to calculate the average price, and in cell F2 to find the most expensive product.2 marks
  3. A police database contains a table of 'Vehicles' with fields 'Registration', 'Make', 'Colour', 'OwnerID'. Describe the query needed to find all vehicles that are either 'Blue' OR 'Silver'.2 marks
  4. A large online retailer wants to analyse customer purchasing habits. They collect data on every click, search, and purchase. Explain why a database would be more suitable than a spreadsheet for this task. Give two distinct reasons.4 marks
  5. A 'Students' table has a primary key 'StudentID'. An 'Awards' table lists prizes given to students. What field must the 'Awards' table contain to link an award to a specific student, and what is this type of field called?2 marks
  6. Define Big Data and describe its three main characteristics (the '3 Vs').4 marks
  7. In a spreadsheet, cell A1 contains a student's exam score. Write an IF function that will display 'Merit' if the score is greater than 75, and 'Pass' otherwise.3 marks
  8. A hospital's patient management system is an example of a Big Data application. Explain how this system demonstrates 'Volume' and 'Variety'.4 marks
  9. A database for a library has a 'Books' table and a 'Loans' table, linked by 'BookID'. Describe the steps a query would take to find the 'Title' of all books currently on loan to the member with 'MemberID' M042.5 marks
  10. Evaluate the use of a spreadsheet to model the inventory of a single, small coffee shop versus a relational database for a national chain of coffee shops. Discuss data integrity, scalability and user access in your answer.6 marks

Go deeper

Practise and revise with member-only material for this chapter.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters