Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have provided SQL code to create all tables and insert all data. There is an error in setting referential integrity: one of the tables

I have provided SQL code to create all tables and insert all data. There is an error in setting referential integrity: one of the tables is missing references. Read the code and identify the problem. You can either modify create table statement or add alter table statement to include missing references.

CREATE TABLE Employees

(

EmployeeID NUMBER NOT NULL,

LastName VARCHAR2(20) NOT NULL,

FirstName VARCHAR2(10) NOT NULL,

Title VARCHAR2(30),

TitleOfCourtesy VARCHAR2(25),

BirthDate DATE,

HireDate DATE,

Address VARCHAR2(60),

City VARCHAR2(15),

Region VARCHAR2(15),

PostalCode VARCHAR2(10),

Country VARCHAR2(15),

HomePhone VARCHAR2(24),

ReportsTo NUMBER,

CONSTRAINT PK_Employees

PRIMARY KEY (EmployeeID),

CONSTRAINT FK_Employees_Employees FOREIGN KEY (ReportsTo) REFERENCES Employees(EmployeeID)

)

/

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

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions

Question

=+ Are there additional forms of employee representation?

Answered: 1 week ago

Question

=+What is the nature of their impact?

Answered: 1 week ago

Question

=+Is it possible to operate union-free?

Answered: 1 week ago