Question: Given the following tables and records: mysql > select * from Emp; + - - - - - + - - - - - -

Given the following tables and records:
mysql> select * from Emp;
+-----+-------+--------+------+
| cid | cname | salary | pid |
+-----+-------+--------+------+
|1| Mary |12000|1|
|2| Tom |6000|2|
|3| Sam |6000|2|
+-----+-------+--------+------+
mysql> select * from Prj;
+-----+--------+
| pid | pname |
+-----+--------+
|1| Java |
|2| Python |
|3| Web |
+-----+--------+
If we want to have a foreign key (without CASCADE) relationship between the Emp and Prj tables, which answer is FALSE?
Given the following tables and records:
mysql> select * from Emp;
+-----+-------+--------+------+
| cid | cname | salary | pid |
+-----+-------+--------+------+
|1| Mary |12000|1|
|2| Tom |6000|2|
|3| Sam |6000|2|
+-----+-------+--------+------+
mysql> select * from Prj;
+-----+--------+
| pid | pname |
+-----+--------+
|1| Java |
|2| Python |
|3| Web |
+-----+--------+
If we want to have a foreign key (without CASCADE) relationship between the Emp and Prj tables, which answer is FALSE?
The two pid columns must have the same data type.
It is not necessary to remove the record with Sam in the Emp table before we define the foreign key relationship.
The pid column in the Prj table must be the primary key.
The foreign key statement should be defined in the Prj table.

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!