Question: id INTEGER PRIMARY KEY, name VARCHAR(30) NOT NULL ) CREATE TABLE toys ( id INTEGER PRIMARY KEY, name VARCHAR(30) NOT NULL, cat_id INTEGER NOT NULL,

id INTEGER PRIMARY KEY, name VARCHAR(30) NOT NULL ) CREATE TABLE toys ( id INTEGER PRIMARY KEY, name VARCHAR(30) NOT NULL, cat_id INTEGER NOT NULL, FOREIGN KEY (cat_id) REFERENCES cats(id) ); 7. What is the best way to change the SQL database schema above if you want all the toys data related to a single cat deleted when the cat is deleted? Remove the foreign key reference from the table. Add the ON DELETE CASCADE clause on the foreign key reference. Create another foreign key reference on the table. Combine the two tables into one table. 8. Which of the following BEST describes the purpose of a "join table" in a SQL database schema? To have one table connected to all tables. To make SQL JOIN statements. To create a one-to-many relationship within the same table. To create a many-to-many relationship between two tables
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
