Question: Assume that the takes relation has not yet been defined. Give an SQL statement that adds the takes relation to the database. Assume that: Id

 Assume that the takes relation has not yet been defined. Give

Assume that the takes relation has not yet been defined. Give an SQL statement that adds the takes relation to the database.

Assume that:

Id is an integer

course_id is a string of up to10 characters.

sec_id should be a non-negative integer.

the semester is a one-character field, equal to either F or S, and the

year is an integer.

grade can be null, but if not, it should be a letter in the string ABCDF.

Your statement must ensure that no attributes, other than the grade, are allowed to be null in this relation, identify a suitable primary key, and indicate appropriate foreign key(s). Include not null constraints only on attributes where the domain is not already constrained to exclude nulls.

.

student takes ID course_id sec_id semester year name dept_name tot_cred grade section advisor course id sec_id course course_id title dept_name credits semester department dept_name building budget Slid i id year building room_no time_slot_id time_slot time slot_id day start_time end_time instructor classroom building room_no capacity prereq course_id prereg_id ID name dept_name salary teaches course_id sec_id semester year

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!