Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2) Suppose we wanted to add a deans_list relation that included student numbers and the semester. Give the SQL statement needed to create this relation.
2) Suppose we wanted to add a deans_list relation that included student numbers and the semester. Give the SQL statement needed to create this relation. Your statement must specify that no attributes are allowed to be null in this relation, identify a suitable primary key, and indicate an appropriate foreign key. (5 points each) create table deans_list id int, semester varchar (10), primary key(id, semester), foreign key (id) references student); a) Would specifying not null further constrain the values in the attributes' domains? b) What would be the problem with defining the primary key as just id? c) Why can't the semester attribute be a foreign key referencing class? d) Give the SQL statement needed to add an address attribute to the student relation. e) Give the SQL statement needed to remove all tuples from the student relation (but not delete the relation itself)
Step 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