Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please produce an ER diagram that best represents the relational schema below. CREATE TABLE TA ( EMPID INTEGER PRIMARY KEY, NAME VARCHAR ( 6 0

Please produce an ER diagram that best represents the relational schema below.
CREATE TABLE TA (
EMPID INTEGER PRIMARY KEY,
NAME VARCHAR(60),
ADDR VARCHAR(120),
PHONE CHAR(10),
DOB DATE,
SENIORITY DATE NOT NULL
);
CREATE TABLE COURSE_COORDINATOR (
EMPID INTEGER PRIMARY KEY,
FOREIGN KEY (EMPID) REFERENCES TA(EMPID) ON DELETE CASCADE,
EMAIL CHAR(20) NOT NULL,
FIRST_TUTORIAL DATE NOT NULL
);
CREATE TABLE LAB_LEADER (
EMPID INTEGER PRIMARY KEY,
FOREIGN KEY (EMPID) REFERENCES TA(EMPID) ON DELETE CASCADE,
HELP_DESK CHAR(1),
COURSE INTEGER,
FOREIGN KEY (COURSE) REFERENCES COURSE(COURSEID)
);
CREATE TABLE COURSE (
COURSEID INTEGER PRIMARY KEY,
SHORTNAME CHAR(40),
FULLNAME CHAR(60),
COURSE_COORDINATOR INTEGER NOT NULL,
UNIQUE(COURSE_COORDINATOR),
FOREIGN KEY (COURSE_COORDINATOR) REFERENCES COURSE_COORDINATOR(EMPID)
);
CREATE TABLE TUTOR (
EMPID INTEGER,
FOREIGN KEY (EMPID) REFERENCES TA(EMPID),
COURSE INTEGER,
FOREIGN KEY (COURSE) REFERENCES COURSE(COURSEEID),
PRIMARY KEY (EMPID, COURSE)
);

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

Practical Neo4j

Authors: Gregory Jordan

1st Edition

1484200225, 9781484200223

More Books

Students also viewed these Databases questions

Question

What is the product life cycle?

Answered: 1 week ago