Question: Already created primary keys, Need help with the foreign keys. See details below. 4 CREATE TABLE SELECT gives you the data definitions and data, but

Already created primary keys, Need help with the foreign keys. See details below.

Already created primary keys, Need help with the foreign keys. See detailsbelow. 4 CREATE TABLE SELECT gives you the data definitions and data,

4 CREATE TABLE SELECT gives you the data definitions and data, but no keys. So now you will need to ALTER TABLE statements to create keys as shown in the table below. The primary keys are the ones shown with the key icon on the original schema. VERY IMPORTANT- MySQL requires that a foreign key reference a primary key OR indexed attribute. My advice: create all of the PRIMARY KEYS first, then the foreign keys (or be very careful of the order in which your ALTER the tables. Foreign Key deletion should be handled [as specified] in the table. DO NOT specify any ON UPDATE handling

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!