Answered step by step
Verified Expert Solution
Link Copied!

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)

image text in transcribed

- 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

2. Identify issues/causes for the apparent conflict.

Answered: 1 week ago

Question

3. What strategies might you use?

Answered: 1 week ago