Class 10 Computer Science — Tables, records and fields
Read a database table as records and fields, count what it holds, and say what a primary key is doing in it.
Name: ________________________
1.A table of six fields and thirty records is shown on screen with a heading row above it naming the fields. How many rows are on the screen altogether?
2.A roll number that is meant to be a table's primary key is typed in twice by mistake, so two different records now hold 41. What can no longer be done?
- a) No further records can be added to the table
- b) The table can no longer be sorted by any of its fields
- c) The other records lose their roll numbers
- d) One record can no longer be picked out by giving its roll number alone
3.A table of two hundred pupils has a field holding the name of each pupil's form teacher, and the school has twenty form teachers. What is actually stored in that field?
- a) A number saying which teacher, with the names kept nowhere
- b) One teacher's name in every pupil's record, so most of the names are stored many times over
- c) Nothing, because a field cannot hold the same value twice
- d) Each teacher's name once, in the first record that needs it
4.A school keeps one record for each pupil. Sort each field by whether it could be that table's primary key.
Groups: Could be the primary key · Could not be the primary key
- First name
- Roll number
- Admission number
- Date of birth
- Email address
- House
5.Match each word to what it names in a database table.
- Record
- Field
- Primary key
- Table
- Value
- All the records of one kind, kept together
- One row: everything the table holds about one thing
- What one field holds in one record
- One column: one particular piece of information, asked of every row
- The field whose value is never repeated in two records
6.Two tables have exactly the same five fields as each other. One holds thirty records and the other forty-five. They are joined into a single table holding all of both. How many records does that table have?
7.A table has five fields and a hundred and twenty records. How many single pieces of information does it hold altogether?
8.What is a primary key for?
- a) It is whichever field happens to be the first column of the table
- b) It is the field the table is kept sorted by
- c) It is the field whose value is different in every record, so that any one record can always be picked out
- d) It is the password that has to be given before the table will open
Answer key — Class 10 Computer Science — Tables, records and fields
- 1. 31
- 2. d) One record can no longer be picked out by giving its roll number alone
- 3. b) One teacher's name in every pupil's record, so most of the names are stored many times over
- 4. Roll number → Could be the primary key; First name → Could not be the primary key; Admission number → Could be the primary key; Date of birth → Could not be the primary key; Email address → Could be the primary key; House → Could not be the primary key
- 5. Record → One row: everything the table holds about one thing; Field → One column: one particular piece of information, asked of every row; Primary key → The field whose value is never repeated in two records; Table → All the records of one kind, kept together; Value → What one field holds in one record
- 6. 75
- 7.
- 600
- six hundred
- 8. c) It is the field whose value is different in every record, so that any one record can always be picked out