Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago