an entity relationship (er) diagram is a graphic that shows the interrelationship between entities...

5
WHAT IS AN ENTITY RELATIONSHIP DIAGRAM? An Entity Relationship (ER) Diagram is a graphic that shows the interrelationship between entities in a database.

Upload: shanon-gilbert

Post on 05-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: An Entity Relationship (ER) Diagram is a graphic that shows the interrelationship between entities in a database

WHAT IS AN ENTITY RELATIONSHIP

DIAGRAM?

An Entity Relationship (ER) Diagram is a graphic that shows the interrelationship between entities in a database.

Page 2: An Entity Relationship (ER) Diagram is a graphic that shows the interrelationship between entities in a database

WHAT ARE THE SYMBOLS USED IN ENTITY

RELATIONSHIP DIAGRAMS?

The symbols used in ER Diagrams are Boxes, Diamonds and Ovals.1) Boxes are commonly used to represent entities.2) Diamonds are normally used to represent relationships.3) Ovals are used to represents attributes.

Page 3: An Entity Relationship (ER) Diagram is a graphic that shows the interrelationship between entities in a database

WHAT IS A ONE TO ONE RELATIONSHIP?

A one-to-one relationship is when the primary record have only one related record. A stock table contains exactly one record in a stock detail table. Both tables have the same Stock Id as primary key. In the stock detail table, Stock Id is the primary key and also a foreign key to stock table. This is one of the common ways to define one-to-one relationship.

Page 4: An Entity Relationship (ER) Diagram is a graphic that shows the interrelationship between entities in a database

WHAT IS A ONE TO MANY RELATIONSHIP?

A one to many relationship is a relation in which one record in a table is related to many records in another table. An example of this is a stock table which has many occurrences in a stock daily record table.

Page 5: An Entity Relationship (ER) Diagram is a graphic that shows the interrelationship between entities in a database

WHAT IS A MANY TO MANY RELATIONSHIP?

A many-to-many relationship is a data relationship in which the value of 1 data element can be combined with many values of another data element and vice versa. For example, in a library database, one record in the Titles table could relate to several records in the Borrower table, since several people might have signed out copies of the same book.