What is a relational database?

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

What is a relational database?

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. In a relational database, what does one record represent?
A One column, such as all student names
B One row, such as a single student
2. In a relational database, what is a field?
A A column that holds one type of data, like Surname
B A whole table of linked data
3. Which statement describes a relational database best?
A One giant sheet holding all the data
B Separate tables linked by shared values
4. A school stores Students in one table and Subjects in another. How do they connect?
A Through a shared value, like a student ID
B By copying every subject into the Students table
5. Which is a difference between a database and a spreadsheet?
A A database links many tables together
B A database can only ever hold one table

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1Table AStudents(StudentID, FirstName, Year)
2Record BStudents.ClassID = Classes.ClassID
3A field is a column that holds one kind of data about every record in a table CA grid that stores one type of thing, such as Students or Subjects, with its own fields and records
4Two tables are linked by a shared value, so data is stored once and connected DOne row in a table that holds all the data about a single item, such as one student
5A relational database is one big sheet where every fact is repeated on each row EA relational database splits data into separate linked tables so facts are stored once, not repeated in one big sheet
6A record is a column and a field is a row FThe terms are swapped: a record is a row and a field is a column

Definitions

relational database

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
_____: Students Fields: StudentID, Name, Year Record: 101, Mia, 9
2.
Table: Students ______: StudentID, Name, Year Record: 101, Mia, 9
3.
Table: Students Fields: StudentID, Name, Year ______: 101, Mia, 9
4.
Table: Loans(LoanID, StudentID, BookID) Table: Students(StudentID, Name, Year) Link: Loans._________ = Students.StudentID
5.
Spreadsheet: one sheet Database: many ______ linked by keys

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A Table: Students
B Records: StudentID, Name, Year
C Record: 101, Mia, 9
D Record: 102, Ben, 10
Question 2
A Table: Books
B Fields: BookID, Title
C Record: Holes, 1
D Record: 2, Hatchet
Question 3
A Table: Students
B Fields: StudentID, Name
C Table: Loans
D Fields: LoanID, Book
E Linked by: StudentID
Question 4
A Spreadsheet: a single sheet
B Database: many linked tables
C Tables join on shared values
D Each record is one column
Question 5
A Table: Songs
B Fields: SongID, Title
C Record: 1, Sunrise, Luna
D Record: 2, Moon, Kite

Answer Key

What is a relational database?
Section A: Quick Questions
Q1
B — One row, such as a single student
Q2
A — A column that holds one type of data, like Surname
Q3
B — Separate tables linked by shared values
Q4
A — Through a shared value, like a student ID
Q5
A — A database links many tables together
Section B: Match the Pairs
Q1
Table → A grid that stores one type of thing, such as Students or Subjects, with its own fields and records
Q2
Record → One row in a table that holds all the data about a single item, such as one student
Q3
A field is a column that holds one kind of data about every record in a table → Students(StudentID, FirstName, Year)
Q4
Two tables are linked by a shared value, so data is stored once and connected → Students.ClassID = Classes.ClassID
Q5
A relational database is one big sheet where every fact is repeated on each row → A relational database splits data into separate linked tables so facts are stored once, not repeated in one big sheet
Q6
A record is a column and a field is a row → The terms are swapped: a record is a row and a field is a column
Section C: Definitions
Q1
relational database — A database that stores data in separate tables of fields (columns) and records (rows), with tables linked by shared values such as keys.
Section D: Fill in the Blanks
Q1
Table: Students Fields: StudentID, Name, Year Record: 101, Mia, 9
Q2
Table: Students Fields: StudentID, Name, Year Record: 101, Mia, 9
Q3
Table: Students Fields: StudentID, Name, Year Record: 101, Mia, 9
Q4
Table: Loans(LoanID, StudentID, BookID) Table: Students(StudentID, Name, Year) Link: Loans.StudentID = Students.StudentID
Q5
Spreadsheet: one sheet Database: many tables linked by keys
Section E: Spot the Error
Q1
B — StudentID, Name and Year are the column headings, so they are fields, not records. Line 2 should start with 'Fields:'. Records are the rows of data below.
Q2
C — Values in a record must follow the same order as the fields. BookID comes first, then Title, so the record should be 'Record: 1, Holes'.
Q3
D — The Loans table must contain StudentID so it shares a value with the Students table. Without it the tables cannot be linked. It should be 'Fields: LoanID, StudentID'.
Q4
D — A record is one row of a table, holding all the data about one item. A column is a field. It should be 'Each record is one row'.
Q5
B — Each record has three values, so the table needs three fields. The Artist field is missing. It should be 'Fields: SongID, Title, Artist'.