Question: 1 Single Table Constraints Your first task as a database designer is to create an initial schema for all the tables with attributes and their

1 Single Table Constraints
Your first task as a database designer is to create an initial schema for all the tables with attributes and their abovementioned types. Adhere to the Primary Key and Foreign Key constraints, and use the same names for the tables and the columns. Additionally, add the database requirements calls for the following single table Not NULL, Unique, and check constraints:
1.1 Not NULL and Unique Constraints:
\table[[Column Name,Constraint],[first_name,NOT NULL],[student_id,NOT NULL],[contact_number,NOT NULL, UNIQUE],[email_id,UNIQUE],[tot_credits,NOT NULL]]
Table 9: student
\table[[Column Name,Constraint],[\table[[course_id],[course_name],[credits]],NOT NULL],[NOT NULL, UNIQUE,],[NOT NULL,]]
Table 10: courses
\table[[Column Name,Constraint],[grade,NOT NULL]]
Table 11: student_courses
\table[[Column Name,Constraint],[semester,NOT NULL]]
Table 12: course_offers
\table[[Column Name,Constraint],[professor_first_name,NOT NULL],[professor_last_name,NOT NULL],[contact_numner,NOT NULL]]
Table 13: professor
\table[[Column Name,Constraint],[entry_year,NOT NULL],[seq_number,NOT NULL]]
Table 14: valid_entry
4
\table[[Column Name,Constraint],[dept_name,NOT NULL, UNIQUE]]
Table 15: department
1.2 Check Constraints:
tot_credits in the student table should be greater than or equal to 0.
credits in the courses table should be greater than 0.
grade in student_courses should be between 0 and 10(inclusive).
start_year should be less than or equal to resign_year in the professor table.
semester should either be 1 or 2 in course_of fers and student_courses tables.
course_id must have first 3 characters as some dept_id and next 3 characters must be digits.
 1 Single Table Constraints Your first task as a database designer

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!