Skip to content
KALANBLON
Show contents

Chapter 7 of 7 · 10 min

Quiz: designing and changing

Modelling, constraints, changes and transactions: let's check that your database stays consistent whatever happens. You need 70% correct answers.

Quiz

6 questions · pass mark: 70%

  1. 1.Students take several courses, and each course has several students. How do you model this?

    One answer

  2. 2.In SQLite, a city is inserted with a country code that doesn't exist, without error. Why?

    One answer

  3. 3.Complete to forbid a negative price.

    Complete the code

    CREATE TABLE items (
      id INTEGER PRIMARY KEY,
      price REAL NOT NULL ____ (price >= 0)
    );
  4. 4.What does UPDATE items SET price = 0; do?

    One answer

  5. 5.Which statements about transactions are true? (several answers)

    Several answers possible

  6. 6.In INSERT … ON CONFLICT (name) DO UPDATE SET stock = stock + excluded.stock, what does excluded refer to?

    One answer

Your progress is saved on this device. Create a free account to keep your progress on all your devices.