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 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 yearStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started