Lecture 7 Announcements ------------------ - Hw#2 is up, due on thursday - Hw#1 answers are posted, let me know if you find any mistakes - Lecture exercise after class ER Data Modeling Paradigm ---------------------------- -- Object-oriented data modeling: entity-relationship data models -- Entity: basic object classes that we will store data about Define: name of entity its key a number of attributes -- Relationships: information that connects two or more entities Student RIN: Key Name Email Address Class GPA - Converting an ER diagram to relational data model - Convert each entity into a relation Attributes of the entity become attributes of the relation KEy of the entity becomes key of the relation - For binary relationships: If it is one-to-many: take the key for the entity on the 1 side and include it as an attribute in the other entity. If it is one-to-one: then you can include the key of one entity in the other relation If it is many-to-many: then create a new relation that has the key of each entity it combines, the combination of the keys will be the key of the new relation. Any attribute that the relationship has goes to the entity that it is mapped to. ---------- ER Diagrams ---------------- Covid-19/Health informatics/Health and Fitness Financial data/transactions Sports Politics Animals Spotify IMDB Jeopardy Olympics Radio/Spotify Movies/Streaming Yelp AirBnB Movie DB ------------- Movies id: primary key duration release date title US_Rating BoxOfficeWinnings Actors id: key name stage name dob place of birth dod biopgraphy education Studios name: key country of origin Directors: id: key name stage name dob place of birth dod biopgraphy education Awards name //oscars type //best picture frequency first_year_given key: name, type