Presentation is loading. Please wait.

Presentation is loading. Please wait.

Entity Relationship Modelling. What is Entity Relationship Modelling? The Entity-Relationship model is – ” “ a data model for high-level descriptions.

Similar presentations


Presentation on theme: "Entity Relationship Modelling. What is Entity Relationship Modelling? The Entity-Relationship model is – ” “ a data model for high-level descriptions."— Presentation transcript:

1 Entity Relationship Modelling

2 What is Entity Relationship Modelling? The Entity-Relationship model is – ” “ a data model for high-level descriptions of conceptual data models, and it provides a graphical notation for representing such data models in the form of entity- relationship diagrams.” [Wikipedia Website]

3 What does this mean? Basically a entity-relationship model is – A simple way to representing on paper, an idea for a data model e.g. a database. A simple way to representing on paper, an idea for a data model e.g. a database. With special graphical systems and symbols. With special graphical systems and symbols.

4 Key Terms Entity Entity Relationship Relationship Attribute Attribute Primary Key Primary Key

5 What is an Entity? An entity represents a discrete object. An entity represents a discrete object. Entities are generally nouns. Entities are generally nouns. Examples include – a computer, an employee, a song. a computer, an employee, a song.

6 Relationships A relationship captures how two or more entities are related to one another. A relationship captures how two or more entities are related to one another. Relationships can be thought of (roughly) as verbs. Relationships can be thought of (roughly) as verbs. Examples include – an owns relation between a company and a computer. an owns relation between a company and a computer. a supervises relation between an employee and a department a supervises relation between an employee and a department a performs relation between an artist and a song a performs relation between an artist and a song

7 Attributes Entities and relationships can both have attributes. Examples – an employee entity might have a national insurance number attribute.. the proved relation may have a date attribute.

8 Primary Keys A primary key is an attribute which can uniquely identify an Entity. A primary key is an attribute which can uniquely identify an Entity. Example – A National Insurance number, as each person has a different number to everyone else.

9 Entity Relationship Diagrams (ERDs) Important - Entity-relationship diagrams don't show single entities or single instances of relations. Entity-relationship diagrams don't show single entities or single instances of relations. they show entity sets and relationship sets. they show entity sets and relationship sets. Example – a particular song is an entity. a particular song is an entity. The collection of all songs in a database is an entity set. The collection of all songs in a database is an entity set.

10 Common Notation There are many systems of notation for ERDs. These are the common symbols used - Entity Sets - drawn as rectangles. Entity Sets - drawn as rectangles. Relationships - drawn as diamonds. Relationships - drawn as diamonds. Attributes - drawn as ovals connected to their owning entity sets by a line. Attributes - drawn as ovals connected to their owning entity sets by a line.

11 Less Common Notion Weak Entities Cannot be identified by their attributes alone Cannot be identified by their attributes alone Therefore must use as its primary key its own attributes and the primary key of an entity it is related to. Therefore must use as its primary key its own attributes and the primary key of an entity it is related to.

12 Example Models Simple Model –

13 Example Models (Cont.) More advanced model –

14 Further Reading Wikipedia Website – Wikipedia Website – http://en.wikipedia.org/wiki/Entity_relationship_diagram Peter Pin-Shan Chen - “The Entity-Relationship Model-Toward a Unified View of Data” http://bit.csc.lsu.edu/~chen/pdf/erd.pdf


Download ppt "Entity Relationship Modelling. What is Entity Relationship Modelling? The Entity-Relationship model is – ” “ a data model for high-level descriptions."

Similar presentations


Ads by Google