Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Primary keys
Foreign keys
Updating and deleting with foreign keys
Summary
18. Question 2

Instruction

Awesome! One more question for you!

Exercise

The publishing house now needs a review system for their textbooks. Create a table named review with the following columns:

  1. id – An integer and the primary key.
  2. textbook_id – An integer and a foreign key referencing the id column in the textbook table.
  3. content – A text value of any length.

The foreign key should be constructed so that whenever a corresponding row in the textbook table is updated or deleted, the changes are reflected in the review table.