Question
q1. In a faculty_course table, one faculty can offer many courses and one course can be offered by many faculty. Which SQL statement correspond to
q1. In a faculty_course table, one faculty can offer many courses and one course can be offered by many faculty. Which SQL statement correspond to this constraint? fid stands for faculty id. cid stands for course id
1. create table faculty_course(fid int, cid char(7));
2. create table faculty_course(fid int primary key, cid char(7));
3. create table faculty_course(fid int, cid char(7) primary key));
4. create table faculty_course(fid int, cid char(7), primary key(fid, cid));
Q2. Which of the following statement(s) is/are true?
1. A column c1 in a table T1 to be a foreign key, c1 must be a primary key of T1
2. A column c1 in a table T1 to be a foreign key, it must refer to a candidate key of another distinct table
3. A column c1 in a table T1 to be a foreign key, it must refer to a primary key of another distinct table
4 . A column c1 in a table T1 to be a foreign key can refer to any column with no constraints in a distinct table
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started