• 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. 1. A school stores each student's address once, and other tables refer to it. What does this mainly achieve?

    1. Faster printing of reports
    2. Less redundancy, so one update corrects the address everywhere
    3. No further need for backups
    4. Stronger login passwords
    Show answer

    Answer: B. Storing data once and referring to it removes repeated copies, so one change is seen everywhere.

  2. 2. Which statement correctly separates the two terms?

    1. A DBMS is the data; a database is the software that manages it
    2. Both terms mean the hard disk that stores files
    3. A database is the organised data; a DBMS is the software that manages it
    4. 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. 3. Many clerks editing the same plain files at the same time cause clashes. Which DBMS advantage addresses this?

    1. Data redundancy
    2. A separate private copy of the files for each clerk
    3. Larger file sizes
    4. 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. 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?

    1. 45
    2. 48
    3. 40
    4. 54
    Show answer

    Answer: A. Now 9 records and 5 fields: 9 x 5 = 45.

  5. 5. Table Employee has fields EmpID, Name, Phone and City. EmpID and Phone are each unique for every employee. Which statement is correct?

    1. Only Name can be a candidate key
    2. EmpID and Phone are both candidate keys
    3. City is the best primary key
    4. 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. 6. Why is Name a poor choice of primary key in a Students table?

    1. Primary keys must be numbers, and names are text
    2. Names are too long to store
    3. Two students can have the same name
    4. 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. 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?

    1. An ER diagram
    2. A primary key
    3. An attribute
    4. 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. 8. In an ER diagram, the entity Student has the attribute Name. How are they drawn?

    1. Student as a rectangle and Name as an oval
    2. Student as an oval and Name as a rectangle
    3. Both as diamonds
    4. Student as a diamond and Name as a rectangle
    Show answer

    Answer: A. Entities are rectangles, attributes are ovals and relationships are diamonds.

  9. 9. Each person has exactly one passport record, and each passport record belongs to exactly one person. Which relationship is this?

    1. One-to-many
    2. One-to-one
    3. Many-to-many
    4. Many-to-one
    Show answer

    Answer: B. One record on each side matches exactly one record on the other: 1:1.

  10. 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?

    1. 70
    2. 72
    3. 75
    4. 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. 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?

    1. 2
    2. 0
    3. 3
    4. 1
    Show answer

    Answer: D. Only 55 is less than 63; 63 itself is not less than 63.

  12. 12. Which statement removes only the record with Roll 2 from the Students table?

    1. DELETE FROM Students WHERE Roll = 2;
    2. DELETE FROM Students;
    3. UPDATE Students SET Roll = 2;
    4. 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. 13. Two students are entered with the same Roll, which is the primary key. Which rule is broken?

    1. Referential integrity
    2. Entity integrity
    3. Domain integrity
    4. Authorisation
    Show answer

    Answer: B. Entity integrity says the primary key cannot be empty or repeated.

  14. 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,

    1. Authorisation, then authentication
    2. Backup, then recovery
    3. Authentication, then authorisation
    4. Normalisation, then integrity
    Show answer

    Answer: C. Logging in proves identity (authentication); limiting what the user may do is authorisation.

  15. 15. After a disk failure, data is brought back from a copy kept elsewhere. Keeping that copy and bringing the data back are called

    1. Normalisation and integrity
    2. Authentication and authorisation
    3. Redundancy and inconsistency
    4. Backup and recovery
    Show answer

    Answer: D. A backup is the stored copy; recovery restores the data from it.

Privacy · Terms · Refunds · Delivery