1 / 21

Chapter 7: Data Modeling Using the Entity Relationship (ER) Model

Chapter 7: Data Modeling Using the Entity Relationship (ER) Model. Database Design Phases. Instance of entities with attributes. Composite attribute:. Entity Type v.s. Entity Set. Relationship. Ternary Relationship. Can you think of another example?.

bian
Download Presentation

Chapter 7: Data Modeling Using the Entity Relationship (ER) Model

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 7: Data Modeling Using the Entity Relationship (ER) Model

  2. Database Design Phases

  3. Instance of entities with attributes

  4. Composite attribute:

  5. Entity Type v.s. Entity Set

  6. Relationship

  7. Ternary Relationship Can you think of another example?

  8. Role name of entity and Recursive Relationship

  9. Cardinality ratio: 1:1

  10. Cardinality ratio: M:N

  11. Symbols in ER Diagram Continued next page…

  12. Relationship with higher degree ? why a ≠ b ? Find an equivalent binary relationship

  13. Exercise 1: • What are the entities in the E-R diagram? • Which queries could be answered using this database? • List all airports (airport_code) in New York State. • List the airlines with frequent flier program. • List airplanes (airplane_id) that could land on Minneapolis Airport. • List the airplanes (airplane_id) assigned to flight #5 for Delta Airline. • List all airports within 500 miles of Minneapolis Airport. • List flight leg instances which were late by at least on hour. • In this database, how many fares are possible for a give flight? • (A). at most one; (B). many • How many scheduled arrive time could a flight have for a given airport? • (A). at most one; (B). many

  14. 5. Which of the following have unique values in the database? • airport_code • airplane_id • seat_no. • leg_no.

  15. Exercise 2: The database needs to keep track of each U.S. STATE’s Name (e.g., ‘Texas’, ‘New York’, ‘California’) and include the Region of the State (whose domain is {‘Northwest’, ‘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 Data_of_vote on the bill, whether the bill Passed_or_failed (whose domain is ‘yes’ or ‘no’), and the Sponsor (the congressperson(s) who sponsored-that is , proposed-the bill). The database also keeps track of how each congressperson voted on each bill (domain of Vote attribute is {‘yes’, ‘no’, ‘abstain’,’absent’}).

  16. Identify major entities and their identifying attributes • Identify major relationship among entities and their cardinality constraints (1:1, 1:N, M:N) • Design an ER schema diagram for this application.

More Related