Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the following relational database schema: Student = (SSN, Name, Major) Course = ( CourseNumber, Quarter, CourseTitle, NumberOfUnits, RoomNumber, DayTime), where DayTime is of the

Given the following relational database schema:

Student = (SSN, Name, Major)

Course = ( CourseNumber, Quarter, CourseTitle, NumberOfUnits, RoomNumber, DayTime), where DayTime is of the form MW 1:0-2:00.

Enrollment = (SSN,CourseNumber, Grade)

Write DDL statements to create the above tables and use appropriate data types for each attribute. The DDL statement must include at least the following constraints:

Every Primary Key;

Every Foreign Key;

For every Foreign Key constraint, specify an appropriate referential integrity constraints as follows:

ON DELETE SET NULL or SET DEFAULT ;

ON UPDATE CASCADE or SET NULL.

0 < NumberOfUnits < 5;

Grade is either A, B, C, D, or F;

The Name and Quarter can not be null;

The Major and Grade may assume the null value.

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

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago