0
Entity Relationship ModelingObjectives:• To illustrate how relationships between entities are  defined and refined.• To kn...
Entity-Relationship (ER) Modeling. ER Modeling is a top-down approach to database  design. Entity Relationship (ER) Diag...
Notation   Entity       Attribute   Relationship               EntityNameEntityName                  Verb phrase          ...
Entities Examples of entities:   Person: LECTURER, STUDENT   Place: CLASS ROOM, WAREHOUSE   Object: MACHINE, PRODUCT, ...
Attributes Example of entity types and associated attributes:   STUDENT: Student_ID, Student_Name, Home_Address,     Phon...
Relationship Associations between instances of one or more entity types that is of interest Given a name that describes ...
Relationship The degree of a relationship = the number of entity sets that participate in the relationship   Mostly bina...
One-One and One-Many
Many-one and many-many
Notations
Notations
Example
Tables                                     Student                             PK     N_ID                                ...
Upcoming SlideShare
Loading in...5
×

Entity relationship modeling

1,491

Published on

Entity relationship modeling with examples

0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,491
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
94
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Transcript of "Entity relationship modeling"

  1. 1. Entity Relationship ModelingObjectives:• To illustrate how relationships between entities are defined and refined.• To know how relationships are incorporated into the database design process.• To describe how ERD components affect database design and implementation.
  2. 2. Entity-Relationship (ER) Modeling. ER Modeling is a top-down approach to database design. Entity Relationship (ER) Diagram  A detailed, logical representation of the entities, associations and data elements for an organization or business Notation uses three main constructs  Data entities  Relationships  Attributes
  3. 3. Notation Entity Attribute Relationship EntityNameEntityName Verb phrase List of AttributesAcceptable
  4. 4. Entities Examples of entities:  Person: LECTURER, STUDENT  Place: CLASS ROOM, WAREHOUSE  Object: MACHINE, PRODUCT, CAR  Event: REGISTRATION, LECTURE  Concept: COURSE, LECTURE Guidelines for naming and defining entity types:  An entity type name is a singular noun  An entity type should be descriptive and specific  An entity name should be concise  Event entity types should be named for the result of the event, not the activity or process of the event.
  5. 5. Attributes Example of entity types and associated attributes: STUDENT: Student_ID, Student_Name, Home_Address, Phone_Number, B_Date Guidelines for naming attributes:  An attribute name is a noun.  An attribute name should be unique  To make an attribute name unique and clear, each attribute name should follow a standard format  Similar attributes of different entity types should use similar but distinguishing names.
  6. 6. Relationship Associations between instances of one or more entity types that is of interest Given a name that describes its function. • relationship name is an active or a passive verb. Relationship name: Lecture Lecturer Subject An Lecturer gives lecture on one or more Subjects A Subject can be taught by one or more lecturer.
  7. 7. Relationship The degree of a relationship = the number of entity sets that participate in the relationship  Mostly binary relationships  Sometimes more Mapping cardinality of a relationship  1 –1  1 – many  many – 1  Many-many
  8. 8. One-One and One-Many
  9. 9. Many-one and many-many
  10. 10. Notations
  11. 11. Notations
  12. 12. Example
  13. 13. Tables Student PK N_ID F_Name Subject L_Name Subject_Dscription Enrollment Address Stud_ID FK B_Date Subject_UnitCK PK Subject_Code Course_Name FK CC# FK Enroll_Date Lecturer Lecture L_Address PK CC# L_FirstName Subject FK L_LastName Time Date L_Email Lecturer_ID FK PK Lecturer_ID
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×