Question: 1. Suppose we start with the following relation-schema declaration: CREATE TABLE Enps ( (1) id INT (2) SSNO INT, (3) nane CHAR(20) managerID INT The

1. Suppose we start with the following relation-schema declaration: CREATE TABLE Enps ( (1) id INT (2) SSNO INT, (3) nane CHAR(20) managerID INT The numbers (1) through (4) are not part of the declaration, but will be used to refer to certain lines. Our intent is that both id and ssNo are keys by themselves, and that the value of manager ID must be one of the values that appears in the id attribute of the same relation Emps. Which of the following is not a legal addition of SQL standard key and/or foreign-key constraints? Note: the addition does not have to achieve all the goals stated; it must only result in legal SQL. O a) Add PRIMARY KEY just before the comma on line (1), and add UNIQUE just before the comma on line (2). b) Add UNIQUE just before the comma on line (1), and add PRIMARY KEY just before the comma on line (2). Oc) Add UNIQUE just before the commas on lines (1) and (2). O d) Add PRIMARY KEY just before the commas on lines (1) and (2). 2. Here are declarations of two relations R and S: CREATE TABLE SC C INT PRIMARY KEY, d INT CREATE TABLE RC a INT PRIMARY KEY, b INT REFERENCES S(C) R(ab) currently contains the four tuples (0.4), (1,5), (2,4), and (3,5). Scd currently contains the four tuples 2,10). 3.11), 4.12), and (5.13). As a result, certain insertions and deletions on R and 'S are illegal. You should develop ple tests for illegal operations of these four kinds. Then show your understanding by indicating which of the following modifications will not violate any constraint. O a) Inserting (4.4) into S. Ob) Inserting (3,4) into R. O c) Inserting (6,1) into R. d) Inserting (1,2) into S
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
