Menu

(Solved) : Consider Following Relational Schema Ddl Statements Tables Show Status Tables Following Op Q31044658 . . .

Consider the following relational schema, DDL statements andtables. Show the status of the above tables after each of thefollowing operations:

Inserting a new employee: 30, F, 6, 9 into the Table EMPLOYEE.If it is rejected, explain

EMPLOYEE( EmployeeID, EmployeeName, SupervisorID, DepartmentID)

PROJECT (ProjectID, EmployeeID)

DEPARTMENT( Department ID, DepartmentName)

CREATE TABLE EMPLOYEE

( EmployeeID         INT PRIMARYKEY,

  EmployeeName   VARCHAR(50) NOT NULL,

  SupervisorID INT DEFAULT 9,

  DepartmentID   INT,

  FOREIGN KEY (SupervisorID) REFERENCES EMPLOYEE(EmployeeID)

  ON DELETE SET NULL ON UPDATE SET DEFAULT

);

CREATE TABLE PROJECT (

ProjectID    INT PRIMARY KEY,

EmployeeID INT DEFAULT 9,

FOREIGN KEY (EmployeeID) REFERENCES EMPLOYEE (EmployeeID)

  ON DELETE SET NULL   );

CREATE TABLE DEPARTMENT(

DepartmentID INT PRIMARY KEY,

DepartmentName   VARCHAR(50)

);

EMPLOYEE EmployeeID EmployeeName SupervisorID DepartmentID NULL PROJECT ProjectID EmployeeID DEPARTMENT DepartmentID DepartmentName

EMPLOYEE EmployeeID EmployeeName SupervisorID DepartmentID NULL PROJECT ProjectID EmployeeID DEPARTMENT DepartmentID DepartmentName Show transcribed image text

Expert Answer


Answer to Consider Following Relational Schema Ddl Statements Tables Show Status Tables Following Op Q31044658 . . .

OR