AS Level Computer Science chapter 8: Databases MCQs with answers

By Team Megalecture · Updated 4 Nov 2026

36 exam-style questions on Databases, each with the answer and a short explanation. Ten of them are below to try. The chapter test draws ten fresh questions each time and is marked the moment you finish, with your score by topic.

36 questions · 3 topics · 10 per test

Test this chapter freeAll AS Level Computer Science chapters

What chapter 8 covers

Ten Databases questions with answers

Try each one, then open the answer. These ten stay the same; the test draws new ones every time.

1. Which statement increases by 2 the price of every book whose author is Smith?

  1. A
    UPDATE BOOK SET Price = Price + 2 WHERE Author = 'Smith';
  2. B
    UPDATE BOOK SET Price = Price + 2;
  3. C
    INSERT INTO BOOK (Price) VALUES (Price + 2) WHERE Author = 'Smith';
  4. D
    ALTER TABLE BOOK SET Price = Price + 2 WHERE Author = 'Smith';
Show answer

Answer: A. UPDATE ... SET ... WHERE changes existing records that match the condition. Without WHERE, every book's price would rise.

2. Which SQL statement belongs to the Data Definition Language (DDL)?

  1. A
    SELECT
  2. B
    UPDATE
  3. C
    INSERT INTO
  4. D
    CREATE TABLE
Show answer

Answer: D. DDL defines or changes the structure of the database (CREATE, ALTER). SELECT, UPDATE and INSERT work with the data, so they are DML.

3. Which pair of tables is a correct 3NF design for STUDENT(StudentID, Name, TutorID, TutorRoom), where each tutor has one room?

  1. A
    STUDENT(StudentID, Name) and TUTOR(TutorID, TutorRoom)
  2. B
    STUDENT(StudentID, Name, TutorID) and TUTOR(TutorID, TutorRoom)
  3. C
    STUDENT(StudentID, Name, TutorRoom) and TUTOR(TutorID, TutorRoom)
  4. D
    STUDENT(StudentID, Name, TutorID, TutorRoom) and TUTOR(TutorID)
Show answer

Answer: B. TutorRoom moves to a TUTOR table keyed on TutorID, and TutorID stays in STUDENT as a foreign key. Dropping TutorID from STUDENT would lose the link.

4. Table LOAN has a field MemberID that must link to the primary key of MEMBER. Which line defines the foreign key?

  1. A
    FOREIGN KEY MEMBER(MemberID) REFERENCES (MemberID)
  2. B
    REFERENCES KEY (MemberID) TO MEMBER(MemberID)
  3. C
    FOREIGN KEY (MEMBER) REFERENCES MemberID(MemberID)
  4. D
    FOREIGN KEY (MemberID) REFERENCES MEMBER(MemberID)
Show answer

Answer: D. The form is FOREIGN KEY (field in this table) REFERENCES OtherTable(field). The first bracket names the local field, then the table and field it refers to.

5. How does a relational database reduce data redundancy?

  1. A
    every table keeps its own full copy of all the data
  2. B
    all the data is stored together in a single flat file
  3. C
    each user is given a separate copy of the database
  4. D
    each fact is stored once and tables are linked by keys
Show answer

Answer: D. Data about each entity is held once in its own table, and foreign keys link the tables, so an update is made in only one place.

6. What is a primary key?

  1. A
    a field chosen to uniquely identify each record in a table
  2. B
    a field that links to the primary key of another table
  3. C
    any field that is indexed to make searching faster
  4. D
    a field that holds the same value in every record
Show answer

Answer: A. The primary key uniquely identifies each record (tuple). A field that refers to another table's primary key is a foreign key.

7. ORDERS(OrderID, CustomerName, Items) stores all the items bought in one field, for example "pen, ruler, pencil". Which normal form does this table fail?

  1. A
    1NF, because one field holds a repeating group
  2. B
    2NF, because of a partial dependency on the key
  3. C
    3NF, because of a dependency between non-key fields
  4. D
    3NF, because the table does not have a foreign key
Show answer

Answer: A. 1NF needs every field to hold a single atomic value with no repeating groups. A list of items in one field breaks this.

8. BOOK has fields BookID, Title, Author and Price. Which query lists the titles of books costing more than 10, cheapest first?

  1. A
    SELECT Title FROM BOOK WHERE Price > 10 ORDER BY Price DESC;
  2. B
    SELECT Title FROM BOOK ORDER BY Price WHERE Price > 10;
  3. C
    SELECT Title FROM BOOK WHERE Price > 10 ORDER BY Price;
  4. D
    SELECT BOOK FROM Title WHERE Price > 10 ORDER BY Price;
Show answer

Answer: C. WHERE comes before ORDER BY, and ORDER BY sorts in ascending order unless DESC is given. SELECT names fields; FROM names the table.

9. What is the role of the query processor in a DBMS?

  1. A
    it lets developers design forms and reports visually
  2. B
    it stores the metadata that describes all the tables
  3. C
    it runs a query, such as SQL, and finds matching data
  4. D
    it makes regular backup copies of the whole database
Show answer

Answer: C. The query processor interprets a query, works out how to run it efficiently and returns the matching data.

10. Which statement adds a new record to MEMBER(MemberID, Surname, Paid)?

  1. A
    INSERT INTO MEMBER (MemberID, Surname, Paid) VALUES ('M0042', 'Rana', TRUE);
  2. B
    INSERT MEMBER VALUES MemberID = 'M0042', Surname = 'Rana', Paid = TRUE;
  3. C
    UPDATE MEMBER (MemberID, Surname, Paid) VALUES ('M0042', 'Rana', TRUE);
  4. D
    INSERT INTO MEMBER VALUES MemberID, Surname, Paid ('M0042', 'Rana', TRUE);
Show answer

Answer: A. The form is INSERT INTO table (field list) VALUES (value list), with values in the same order as the fields. UPDATE changes existing records.

Start the chapter testAbout the AS Level Computer Science test

Read the notes for this chapter

Ways to practise this chapter

Databases: questions students ask

How many Databases MCQs are there?

36, each with the answer and a short explanation, across 3 topics: Database concepts, Database Management Systems (DBMS), Data Definition Language (DDL) and Data Manipulation Language (DML). Every chapter test draws ten of them, so you can take it many times.

Is the AS Level Computer Science chapter 8 test free?

Yes. The test, the answers and the explanations are free and need no sign-up. Sign in only if you want your scores kept across devices.

How is the chapter test marked?

The moment you press Finish: your score, the right answer and an explanation for every question, and the ones you got wrong saved in My mistakes to retry.

Keep going

← Chapter 7: Ethics and ownershipChapter 9: Algorithm design and problem-solving →All chaptersStuck? Ask a question