Answered step by step
Verified Expert Solution
Question
1 Approved Answer
- student(sid, sname, sex, age, year, gpa) [Year is a number between 1 and 5]. - dept(dname, numphds) - prof(pname, dname) - course(cno, cname, dname)
- student(sid, sname, sex, age, year, gpa) [Year is a number between 1 and 5]. - dept(dname, numphds) - prof(pname, dname) - course(cno, cname, dname) [Course numbers are unique within departments.] - major(dname, sid) - section(dname, cno, sectno, pname) [Associates an instructor to a section.] - enroll(sid, grade, dname, cno, sectno) [Associates students to sections.] a. Write an SQL assertion statement to check the constraint that a student cannot enroll in two sections of the same course. b. Write an SQL assertion statement to check the constraint that every section must have at least one student. Explain how this assertion might relate to a total participation constraint on a corresponding entity-relationship diagram. c. The university wants to make some of this information available to a student's resident advisor. The advisor should be able to see the number of classes a student is enrolled in, but not the actual classes or the grades. Create a view that provides this information
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