Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SIGNMENT_5 Consider the following relational schema, referential integrity constraints, and the database state. Write SQL DDL statements to define the database and DML statements to

SIGNMENT_5

Consider the following relational schema, referential integrity constraints, and the database state. Write SQL DDL statements to define the database and DML statements to populate the database. Make any other reasonable assumptions (e.g. for domains/data-types).

Primary Keys:

STUDENT Student_number

COURSE Course_number

PREREQUISITE - Course_number, Prerequisite_number

SECTION Section_identifier

GRADE_REPORT - Student_number, Section_identifier

The following referential integrity constraints should hold (we use the notation:

R.(A1, ..., An) --> S.(B1, ..., Bn)

to represent a foreign key from the attributes A1, ..., An of R (the referencing relation)

to S (the referenced relation)):

PREREQUISITE.(CourseNumber) --> COURSE.(CourseNumber)

PREREQUISITE.(PrerequisiteNumber) --> COURSE.(CourseNumber)

SECTION.(CourseNumber) --> COURSE.(CourseNumber)

GRADE_REPORT.(StudentNumber) --> STUDENT.(StudentNumber)

GRADE_REPORT.(SectionIdentifier) --> SECTION.(SectionIdentifier)

image text in transcribed

Specify the following queries in SQL on the above database schema.

Retrieve the names of all senior students majoring in CS (computer science).

Retrieve the names of all courses taught by Professor King in 2007 and 2008.

For each section taught by Professor King, retrieve the course number, semester, year, and number of students who took the section.

Retrieve the name and transcript of each senior student (Class = 4) majoring in CS.A transcript includes course name, course number, credit hours, semester, year, and grade for each course completed by the student.

Show each step and all work in Oracle SQL developer

image text in transcribed

Questions (i.e. create scheme statements (tables and constraints), insert statements, and queries with results) from Oracle SQL Developer (or similar), paste in a word document

Counte r CeUM N--edUeus Deserrent Spring 08 urtw I Beeson -07-07-08-08-08-oa 102 112-110 17

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

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students also viewed these Databases questions