Question: using sql Problem 3 (40pts): Foreign keys Consider relation schemas below, with primary keys underlined. City (name, state, population, elevation) State (name, region) Mayor (name,

using sql

using sql Problem 3 (40pts): Foreign keys Consider relation schemas below, with

Problem 3 (40pts): Foreign keys Consider relation schemas below, with primary keys underlined. City (name, state, population, elevation) State (name, region) Mayor (name, city, state, party) Governor (name, state, party) Suppose that the following business rules hold: Each mayor governs exactly one city. Each governor governs exactly one state. (a) Write create table statements that encode these relation schemas and business rules with the right foreign key constraints. (Tips: also consider some embedded conditions that make sense of the real- world situation in addition to the explicit business rules) (b) In what order would you drop all these tables? Give all valid sequences. . . Additional Tips: Be aware the attribute with same name in different table could mean differently. Underline denotes Primary Key, multiple underlines in one schema denote a composite Primary Key, as each table can have only one Primary key. Dropping tables need to comply with correct order, creating table also need to be careful about the order, due to the same reason: relationship between tables being implemented in Relational Model by Foreign Key

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!