Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Help please! R is currently empty. Develop a test that determines whether an ins

ID: 3800632 • Letter: H

Question

Help please!

R is currently empty. Develop a test that determines whether an insertion into R is currently legal. Then apply your test to determine which of the following INSERT statements is allowable.

INSERT INTO R(b,c) VALUES(3,4);

Relation R has schema:
  CREATE TABLE R (      a INT PRIMARY KEY,      b INT DEFAULT 0,      c INT NOT NULL  );  

R is currently empty. Develop a test that determines whether an insertion into R is currently legal. Then apply your test to determine which of the following INSERT statements is allowable.

Explanation / Answer

In the given Relation schema, given that

a INT PRIMARY KEY, b INT DEFAULT 0, c INT NOT NULL. so, as b is given default 0 there will be no b value.

The correct answer is not in the given options. The correct one is:

INSERT INTO R (c,a) VALUES (3,4)