Question: In this question, you will do the following: create the relational schema (the tables) based upon an ER design shown below. populate the tables with

In this question, you will do the following: create the relational schema (the tables) based upon an ER design shown below. populate the tables with some example data, and then execute an SQL query that demonstrates the viability of your schema.

Note: in the ER diagram above Section is a weak entity and Section_ID is its key. There is a sharp arrow from Admin to Team. Other than that, everything else should be straightforward.

Relational Schema

Translate the E/R diagram into an equivalent relational schema in SQL (the data definition language, DDL). Do not create any tables that are not needed. Declare primary keys and foreign keys per table appropriately to capture the logic of the E/R diagram correctly. Choose appropriate domain types integer, date, varchar(), etc. as is appropriate. Key attributes in the E/R diagram should be declared as not nullable. For attribute and table names, carry over those from the E/R diagram where you can, and make sensible choices where you cannot.

The Data

Fill your tables with data. You are free to choose any data you like. However, you must make sure that each table contains at least one tuple and that the query you run on your database (see below) returns at least one tuple.

The Query

List all classes (by course number and department) taken by John Malkovich. Since you make up your own data your answer can be completely arbitrary but it cannot be empty!

I need the following three files

1. The schema.sql file that includes all SQL statements to create tables and constraints.

2. The data.sql file that includes all SQL statements to insert the sample data to the created tables.

3. The query.sql that includes the query specified in the assignment which must return valid data.In this question, you will do the following: create the relational schema

Can Teach SSN Professors On Team Rating Department Section ID Course Number TeamID Team Admin Section Sec_of Class Requires Rank Required_by Wait_For Take Grade On_Team2 Req_of GTAS ISA Students SSN Salary Can Teach SSN Professors On Team Rating Department Section ID Course Number TeamID Team Admin Section Sec_of Class Requires Rank Required_by Wait_For Take Grade On_Team2 Req_of GTAS ISA Students SSN Salary

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!