Entity-Relationship Diagrams

Slides:



Advertisements
Similar presentations
Three-Step Database Design
Advertisements

Chapter 3 : Relational Model
Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
Chapter 4 Notes. Entity-Relationship Model E/R Diagrams Weak Entity Sets Converting E/R Diagrams to Relations.
Modeling Data The Entity Relationship Model (ER) For Database Design.
Entity-Relationship Data Model Alex Ostrovsky. Presentation Overview ► Short historical overview ► Elements of E-R Model ► Basic organization & relationships.
Data Modelling. EAR model This modelling language allows a very small vocabulary: Just as English has nouns, verbs, adjectives, pronouns.., EAR models.
1 The Entity-Relationship Data Model Chapter 2 (Database Design)
Databases Illuminated Chapter 7 The Object-Oriented Model.
Unified Modeling Language
Entity Relationship Diagrams Objectives s Learn the Elements of the E-R model (entities, attributes, and relationships) s Show how to apply the E-R model.
Entity-Relationship Data Model N. Harika Lecturer(csc)
Databases : Entity-Relationship Model 2007, Fall Pusan National University Ki-Joune Li These slides are made from the materials that Prof. Jeffrey D. Ullman.
Entity-Relationship Model
 An entity-relationship diagram (ERD) is a specialized graphic that illustrates the interrelationships between entities in a database.
ITEC 3220A Using and Designing Database Systems Instructor: Prof Z. Yang Course Website: 3220a.htm
Databases Illuminated Chapter 3 The Entity Relationship Model.
12/2/2015CPSC , CPSC , Lecture 41 Relational Model.
Copyright © Curt Hill Entities and Relationships The basics and what they have to do with database.
advanced data modeling
Rensselaer Polytechnic Institute CSCI-4380 – Database Systems David Goldschmidt, Ph.D.
Moya messam.  Definition: An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a.
High-level Database Models Prof. Yin-Fu Huang CSIE, NYUST Chapter 4.
A short revision on entity- relationship modelling.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
CS422 Principles of Database Systems Entity-Relationship Model
COP Introduction to Database Structures
Comp 1100 Entity-Relationship (ER) Model
Entity/Relationship Modelling
Data Modeling Using the ERD
Session 2 Welcome: To the fourth learning sequence
Entity-Relationship Model
Entity Relationship Diagram
Entity-Relationship Model
Relational Database Design by ER- and EER-to- Relational Mapping
Business System Development
COP4710 Database Systems E-R Model.
Database Design Oct. 3, 2001.
Chapter 2: Relational Model
Database Design – Lecture 4
CITA 215 Section 3 Data Modeling.
Constraints in Entity-Relationship Models
CPSC-310 Database Systems
CSCI-100 Introduction to Computing
The Entity-Relationship Model
IDEF1X Standard IDEF1X (Integrated Definition 1, Extended) was announced as a national standard in 1993 It defines entities, relationships, and attributes.
The Entity-Relationship Model
CPSC-310 Database Systems
Introduction to Database Systems
מודל הנתונים.
Software Engineering Lecture #11.
Module 8 – Database Design Using the E-R Model
Systems Analysis and Design With UML 2
Data Modeling Concepts
name category name price makes Company Product stockprice buys employs
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
Entities Things about which you need to store data. One entity for each different thing. At least two attributes At least two occurrences Not a property.
ITEC 3220A Using and Designing Database Systems
Chapter 3: Modeling Data in the Organization
ER to Schema.
Data Modeling Concepts
Relational Database Design by ER- and EER-to- Relational Mapping
Software requirements
Guide to Modeling Keys to E-R diagrams.
Class Diagram.
Guide to Modeling Keys to E-R diagrams.
Entity Relationship Model
Database Dr. Roueida Mohammed.
Chapter 3: Multivalued Dependencies
Information system analysis and design
Presentation transcript:

Entity-Relationship Diagrams

Species Pokémon Moves type level name name status type id Instance Of Can Learn Has Moves type id

Purpose of Entity-Relation Model The E/R model is a way to roughly describe the system we want to represent in a database The model represents some of the constraints we want to capture It may seem silly at first, but design is serious business These diagrams can help illustrate potential ways to represent your specific system You can't have an efficient database without good design http://www.texample.net/tikz/examples/entity-relationship-diagram/

Entity Set Entity = "thing" or object Entity Set = collection of similar entities Akin to a class in object-oriented languages Attribute = property of (the entities of) an entity set. Attributes are simple (non-compound values): integers, strings, etc. You should not have an attribute that is a collection (no lists, structs, sets, etc.) http://www.imdb.com/media/rm1147641088/tt0082334

Entity Sets and Attributes In an Entity-Relationship Diagram: Entity set = rectangle Attribute = oval (with a line to the rectangle representing its entity set) Here, "Species" is the entity set. "type" and "name" are attributes of "Species". Every entity in "Species" has a "type" and "name". Species type name

Relationships A relationship connects two or more entity sets. Each is represented by a diamond, with lines to the entity sets involved. Species Instance Of Pokémon type level name name status

Value of an Entity Set The current "value" of an entity set is the set of entities that belong to it. Pokémon name level status aaabaaaajss 69 Sleeping AIIIIIIRRR 31 NULL AATTVVV 29 Paralyzed Species name type Pidgeot Flying Lapras Ice Venomoth Poison

Value of a Relationship Set The current "value" of a relationship set is a set of tuples with one component for each related entity set. Instance Of Pokémon Species aaabaaaajss Pidgeot AIIIIIIRRR Lapras AATTVVV Venomoth

Multiway Relationships Relationships can connect more than two entity sets. Suppose that the relationship set "Battle" involves the entity sets "Pokémon", "Trainers", and "Music". Battle level Trainers name Pokémon name status theme Music

Multiplicity of relationships One-to-One Many-to-one Many-to-many Species Pokemon Trainer has Instance of has Cry Species Item

What is the multiplicity of character to costume? Harry Robe Gandalf Jaime Armor Cape Mal Duster 1. One-to-One 2. One-to-Many 3. Many-to-One 4. Many-to-Many

Representing "Multiplicity" One-to-One relationship has arrows entering both entity sets. Many-to-One relationship has an arrow entering the "one" side. Many-to-Many relationship has a line connecting both entity sets. A Rounded Arrow means "exactly one" Each entity of the first set is related to exactly one entity of the target set. Due to limitations of PowerPoint, I am using -> arrows to represent rounded ones and triangle arrows for normal ones. has Species Cry Each species must have one cry (rounded arrow) Each Pokémon can have at most one trainer (normal arrow) has Pokémon Trainer

What is the multiplicity of Trainer to Catchphrase? 1. Exactly-One-to-Exactly-One 2. One-to-One 3. Many-to-Many 4. Too often Trainer says Catchphrase