Question: 4-5 RUBAN command ption Page: 2 Name: . Based on the following relational schema Company (Company ID integer, name: string, address: string ) StaffStaffTD integer.
4-5 RUBAN command ption Page: 2 Name: . Based on the following relational schema Company (Company ID integer, name: string, address: string ) StaffStaffTD integer. office string, email: string, phone: string Project (ProjectID integer, description: string, status: string Work(WorkID: integer, Company Perform(PerformID integer ID: integer, StafffD integer, since: date) , StafflD: integer, ProjectID integer, Start: date, End date) Write the SQL statements create all primary and foreign key integrity constraints. (25pts) Sond foreign key aen required to create the preceding relations, including appropriate versions of Suppliers Supplyld integer, sname: string, phone: string, address string, state: string) Parts(Partld integer, pname: string, color: string) Catalog(Supplyld integer, Partid: nteger, cost real) 5. Consider the following schema: (20pts) The key fields are underlined, and the domain of each field is listed after the field name. The Catalog relation lists the prices charged for parts by Suppliers. Write the following queries in relational algebra or SQL: (1) Find the names of suppliers (sname) who are located at "SC (2) Find the names of suppliers (sname) who supply parts less than $100 and the related PartID (3) Find the names and phone of suppliers (sname) who supply parts less than $100 and located at "SC (4) Find the SupplyID of suppliers who supply some red or yellow parts
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
