- Foundation
- 15 practice questions
Final self-assessment: database basics
Test yourself on the whole course: 15 questions with answers explained.
If something looks wrong, please tell us.
Attempt all 15 questions before checking any answer; they are a little harder than the lesson checks. Then revisit the lesson for any question you missed - questions 1-3: lesson 1, Data, database and DBMS; questions 4-6: lesson 2, Tables, records, fields and keys; questions 7-9: lesson 3, Relational databases and relationships; questions 10-12: lesson 4, SQL: asking questions of a database; questions 13-15: lesson 5, Integrity, security and database users.
Final self-assessment
-
1. A school stores each student's address once, and other tables refer to it. What does this mainly achieve?
- Faster printing of reports
- Less redundancy, so one update corrects the address everywhere
- No further need for backups
- Stronger login passwords
Show answer
Answer: B. Storing data once and referring to it removes repeated copies, so one change is seen everywhere.
-
2. Which statement correctly separates the two terms?
- A DBMS is the data; a database is the software that manages it
- Both terms mean the hard disk that stores files
- A database is the organised data; a DBMS is the software that manages it
- A database is a printer; a DBMS is its driver
Show answer
Answer: C. Database = organised data. DBMS = software that creates, manages and protects the database.
-
3. Many clerks editing the same plain files at the same time cause clashes. Which DBMS advantage addresses this?
- Data redundancy
- A separate private copy of the files for each clerk
- Larger file sizes
- Shared access for many users at once
Show answer
Answer: D. A DBMS lets many users share the data safely; separate copies would add redundancy and inconsistency.
-
4. A table has 8 records and 6 fields. One record is added and one field is removed. How many data values does it now hold?
- 45
- 48
- 40
- 54
Show answer
Answer: A. Now 9 records and 5 fields: 9 x 5 = 45.
-
5. Table Employee has fields EmpID, Name, Phone and City. EmpID and Phone are each unique for every employee. Which statement is correct?
- Only Name can be a candidate key
- EmpID and Phone are both candidate keys
- City is the best primary key
- A table can have only one candidate key
Show answer
Answer: B. Any field that could serve as the primary key is a candidate key; both unique fields qualify. Names and cities can repeat.
-
6. Why is Name a poor choice of primary key in a Students table?
- Primary keys must be numbers, and names are text
- Names are too long to store
- Two students can have the same name
- A primary key must point to another table
Show answer
Answer: C. A primary key must be unique for every record; names can repeat. Keys need not be numbers, and pointing to another table is a foreign key's job.
-
7. Each student takes many subjects and each subject has many students. A designer adds a table StudentSubject(Roll, SubjectID). What is this extra table called?
- An ER diagram
- A primary key
- An attribute
- A junction table
Show answer
Answer: D. A many-to-many relationship is stored through a third (junction) table holding the keys of both sides.
-
8. In an ER diagram, the entity Student has the attribute Name. How are they drawn?
- Student as a rectangle and Name as an oval
- Student as an oval and Name as a rectangle
- Both as diamonds
- Student as a diamond and Name as a rectangle
Show answer
Answer: A. Entities are rectangles, attributes are ovals and relationships are diamonds.
-
9. Each person has exactly one passport record, and each passport record belongs to exactly one person. Which relationship is this?
- One-to-many
- One-to-one
- Many-to-many
- Many-to-one
Show answer
Answer: B. One record on each side matches exactly one record on the other: 1:1.
-
10. Students table: Asha (Pune, 72), Ravi (Jaipur, 55), Meena (Patna, 90), Imran (Pune, 63), with fields Roll, Name, City and Marks. What does SELECT AVG(Marks) FROM Students WHERE Marks > 60; return?
- 70
- 72
- 75
- 225
Show answer
Answer: C. WHERE keeps 72, 90 and 63. Their sum is 225 and 225 / 3 = 75. (70 is the average of all four.)
-
11. Students table: Asha (Pune, 72), Ravi (Jaipur, 55), Meena (Patna, 90), Imran (Pune, 63), with fields Roll, Name, City and Marks. What does SELECT COUNT(*) FROM Students WHERE Marks < 63; return?
- 2
- 0
- 3
- 1
Show answer
Answer: D. Only 55 is less than 63; 63 itself is not less than 63.
-
12. Which statement removes only the record with Roll 2 from the Students table?
- DELETE FROM Students WHERE Roll = 2;
- DELETE FROM Students;
- UPDATE Students SET Roll = 2;
- SELECT * FROM Students WHERE Roll = 2;
Show answer
Answer: A. DELETE with WHERE Roll = 2 removes just that row. DELETE without WHERE removes every row; SELECT only reads.
-
13. Two students are entered with the same Roll, which is the primary key. Which rule is broken?
- Referential integrity
- Entity integrity
- Domain integrity
- Authorisation
Show answer
Answer: B. Entity integrity says the primary key cannot be empty or repeated.
-
14. A clerk logs in successfully but may only view records, not delete them. The login and the view-only limit are, in that order,
- Authorisation, then authentication
- Backup, then recovery
- Authentication, then authorisation
- Normalisation, then integrity
Show answer
Answer: C. Logging in proves identity (authentication); limiting what the user may do is authorisation.
-
15. After a disk failure, data is brought back from a copy kept elsewhere. Keeping that copy and bringing the data back are called
- Normalisation and integrity
- Authentication and authorisation
- Redundancy and inconsistency
- Backup and recovery
Show answer
Answer: D. A backup is the stored copy; recovery restores the data from it.
Sign in to keep track of the lessons you finish.