Coding task · SQL and MySQL course · Module 11: Capstone project
Design the reviews shelf
Create a new table recenzje that is linked to the ksiazki table through a foreign key (FOREIGN KEY).
Task
Write a CREATE TABLE statement that creates the recenzje table with columns: id (INT, primary key, AUTO_INCREMENT), ksiazka_id (INT), tresc (TEXT) and ocena (INT). Add a foreign key: the ksiazka_id column must reference the id column in the ksiazki table.