Insert the following data into your database separating it appropriately into the make and model tables and
Fantastic news! We've Found the answer you've been seeking!
Question:
Insert the following data into your database separating it appropriately into the make and model tables and setting the make_id foreign key to link each model to its corresponding make.
make | model |
---|---|
Mercury | Milan AWD FFV |
Mercury | Milan FFV |
Mercury | Milan FWD |
Volkswagen | Jetta III |
Volkswagen | Jetta III GLX |
Here is the structure of the tables you will need for this assignment:
CREATE TABLE make ( id SERIAL, name VARCHAR(128) UNIQUE, PRIMARY KEY(id) ); CREATE TABLE model ( id SERIAL, name VARCHAR(128), make_id INTEGER REFERENCES make(id) ON DELETE CASCADE, PRIMARY KEY(id) );
Related Book For
Concepts of Database Management
ISBN: 978-1285427102
8th edition
Authors: Philip J. Pratt, Mary Z. Last
Posted Date: