Database
1. Draw an Entity-Relationship diagram(including cardinality ratio and participa- tion constraint) to represent the following application: A DEPARTMENT has a number of TEACHERS and each TEACHER is affil- iated only with one DEPARTMENT; A STUDENT has only one TEACHER as an advisor, but a TEACHER can advise many STUDENT; on the other hand, TEACHER instructs many STUDENTS, and a STUDENT has a number of instructors. Different AGENCIES support different TEACHERS for various PROJECTS. (15 points) A trucking company is responsible for picking up shipments for warehouses of a retail chain and delivering the shipments to individual retail store locations. A truck may carry several shipments during a single trip, which is identified by Trip#, and delivers those shipments to multiple stores. Each shipment is identi- fied by a Shipment# and include data on shipment volume, weight, destination, etc. Trucks have different capacities for both the volumes they can hold and the weights they can carry. A database is being designed to keep track of truck usage and deliveries and to be used for scheduling trucks to provide timely deliveries to stores. Design an ER schema diagram for the above application. Make any assumptions you need but state them clearly. (45 points) 2. 3. When can relationship types have attributes in an E-R model? (5 points) Design an ER schema for keeping track of information about votes taken in the U.S. House of Representatives during the current two-year congressional session. The database needs to keep track of each U.S. STATE's Name (e.g, 'Texas', New York' Califomia') and include the Region of the state (whose domain is f'Northeast', Midwest', 'Southeast', 'Southwest', 'West']). Each CONGRESS PERSON in the House of Representatives is described by his or her Name, plus the District represented, the Start_date when the congressperson was first elected, and the political Party to which he or she belongs (whose domain is ('Republican', 'Democrat', Independent 'Other')). The database keeps, track of each BILL (i.e., proposed law), including the Bill_name, the Date_of vote on the bill, whether the bill Passed_or failed (whose domain is ('Yes', 'No']), and the Sponsor (the congressperson(s) who sponsored-that 4- proposed-the bill). The database keeps track of how each congressperson voted on each bill (domain of Vote attribute is {'Yes", "No','Abstain, Absent')). Draw an ER schema diagram for this application. State clearly any assumptions you make