S3 Database (2023) - Assignment 1 (Teacher Verison)
S3 Database (2023) - Assignment 1 (Teacher Verison)
1. _______(a)______ key of a table is a set of fields that is a _______(b)______ value and can
be used to identify a record.
2. The hierarchical order of data storage unit from top to bottom is database,
_______(a)______, records and ______(b)_______.
3. Each field in a table is associated with a specific ________________ that defines the kind of
data that can be stored in that column.
4. The design view displays the table structure while the _________________ view displays
the data stored inside the table.
2. Which of the following is the best primary key for the members table of a chain store?
A. Member’s name
B. E-mail address*
C. occupation
D. address
P.2
3. Which of the following can set field names, data types and field sizes?
A. Design view*
B. Datasheet view
C. Filter
D. Report
MC Question 1 2 3 4 5
ANS A B A D A
(3 marks)
Each field in a database table store one type of data but spreadsheet is not.
Each row is a record and column is a field in database but no restriction in spreadsheet.
(2 marks)
P.3
(b) Someone suggested that Age should be in Short Text datatype. Do you agree? Why?
No. Cannot be sorted properly according to the values(e.g. ‘1’,’11’,’2’,’22’,…)
(2 marks)
(d) Age is not suggested to be a field in the above table. Suggest a reason for that and
suggest another field to replace it.
Age changes every year. Date of birth can be used for replacement.
(2 marks)
(e) John suggests that HKID no. can be used as the primary key but Mr. Chan disagrees.
Suggest the reason.
HKID no. is students' privacy.
(1 mark)
P.4
4. Peter is a librarian. He would like to design a database to store the data of books for his library.
The table below shows his design.
Field Name Data Type Field Size Primary key?
the_name_of_the_book Short Text 20 Yes
the_author_of_ the_book Short Text 50 No
the_quantity_of_ the_book Short Text 3 No
the_ISBN_of_ the_book Short Text 13 No
In the design, suggest three areas that need improvement and suggest an alternative for those
areas.
Field name is too long. It should be short and simpler.
(3 marks)
5. John is the owner of a restaurant. He would like to design a database to store the data of the
cuisine sold in his restaurant.
(a) Suggest a suitable data type for each of the following fields. (4M – 1M for each)
Field Name Description Data Type Field Size
Name The name of the cuisine Short Text 20
Ingredient The ingredients of the cuisine Short Text 90
Price The prices of the cuisine Number Single
onsale Whether the cuisine is on sale Yes/No
(b) John would like to add a new field of data type AutoNumber and assign it to be the primary
key. Do you agree? Why? (2 marks)
Yes. It is because all four fields are not suitable to be the primary key. (1M) because none
~ END OF PAPER ~