Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 4: Consider the following schema CLASS (Course#, Section#, Instructor_N

ID: 638866 • Letter: Q

Question

Question 4: Consider the following schema

CLASS (Course#, Section#, Instructor_Name, Semester, Building_Code, Room#, Time_Period, Weekdays, Credit_Hours).

This represents classes taught in a university. List as many candidate keys as you can and state the assumptions under which each candidate key would be valid. (20 points)

Question 5: Consider the following schema for an order-processing database in a company:

CUSTOMER (Cust#, Cname, City)
ORDER (Order#, Odate, Cust#, Ord_Amt) ORDER_ITEM (Order#, Item#, Qty)
ITEM (Item#, Unit_price)
SHIPMENT (Order#, Warehouse#, Ship_date) WAREHOUSE (Warehouse#, City)

Here, Ord_Amt refers to total dollar amount of an order; Odate is the date the order was placed; Ship_date is the date an order is shipped from the warehouse. Assume that an order can be shipped from several warehouses. Specify all the foreign keys and the relations they refer to, respectively. (25 points)

Question 6: Consider the following schema for a database that keeps track of business trips of salespersons in a sales office:

SALESPERSON (SSN, Name, Start_Year, Dept_No)
TRIP (SSN, From_City, To_City, Departure_Date, Return_Date, Trip_ID) EXPENSE (Trip_ID, Account#, Amount)

Specify all the foreign keys and the relations they refer to, respectively (25 points)

Explanation / Answer

4.  Given schema is

CLASS (Course#, Section#, Instructor_Name, Semester, Building_Code, Room#, Time_Period, Weekdays, Credit_Hours).

Candidate keys helps in uniquely identifying the database record. Each and every table contains multiple candidate key. Among several candidate keys, one of the candidate key is made as a primary key.

Possible candidate keys are

5. Foreign key is a column or composite of columns which is/are a primary key of other table that is used to maintain relationship between two tables. A foreign key is a primary key in one table and referenced in another table. A foreign key is mainly used for establishing relationship between two tables.

6. Foreign key is a column or composite of columns which is/are a primary key of other table that is used to maintain relationship between two tables. A foreign key is a primary key in one table and referenced in another table. A foreign key is mainly used for establishing relationship between two tables.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote