1 / 32

Entity Relationship Diagrams

Entity Relationship Diagrams. Class 3. Today’s Class. Recap of ERD Extensions to ERD In-class excercise Group Project. Traditional Systems Development Lifecycle. Planning. Analysis. Logical Design. Physical Design. Implementation. Traditional Systems Development Lifecycle.

daw
Download Presentation

Entity Relationship Diagrams

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Entity Relationship Diagrams Class 3

  2. Today’s Class • Recap of ERD • Extensions to ERD • In-class excercise • Group Project

  3. Traditional Systems Development Lifecycle Planning Analysis Logical Design Physical Design Implementation

  4. Traditional Systems Development Lifecycle Planning Analysis Logical Design Physical Design Implementation

  5. The Analysis Stage • Requirements Determination • Requirements Structuring • Process Modeling (Data Flow Diagrams) • Logic Modeling (structured English) • Conceptual Modeling (ER Diagrams) • Alternative Generation

  6. Unary Relationships • Also calledrecursive relationships • Relationships between instances of single entity class is married to Person

  7. Binary Relationships • Between instances of two entity classes • Most common relationship • Also referred to as HAS-A relationships Order Salesperson

  8. Ternary Relationships • Involves three entities • Relationship must be simultaneous • Different from three separate binary relationships Parts Warehouse Vendors ships

  9. Cardinality • The number of instances of Entity B that can (or must be) associated with each instance of Entity A • Types • Maximum cardinality • Minimum cardinality

  10. Cardinality • The number of instances of Entity B that can (or must be) associated with each instance of Entity A • Types • Maximum cardinality • Minimum cardinality Entity A Entity B

  11. Three Binary Relationships • One-to-one (1:1) • One-to-many (1:N) • Many-to-many (N:M)

  12. Minimum Cardinality • The minimum number of instances of Entity B that may be associated with each instance of Entity A. Customer Order Student Dormitory

  13. Generalization • Some entities are subtypes of other, more general entities • Also called IS-A relationships Employee Consultant Hourly Salaried

  14. Exclusive relationship • Subtypes of supertype are mutually exclusive Teacher Part-time Full-time

  15. Non-Exclusive Relationship • Subtypes may overlap Client Personal Computers Client- Server Mainframe

  16. Inheritance • Property by which all the attributes of the supertype are inherited by each subtype

  17. Example contd. • STUDENT: ID, Name, Address, Phone, Email • GA:ID , faculty • UGA:ID, Location, Supervisor Name Phone Address Email ID Student ID ID Location UGA GA Supervisor Faculty

  18. Multivalued Attributes • Can have more than one value for each entity instance Employee SKILL EmpNo Name

  19. Entities Attributes Relationships unary binary ternary Cardinality maximum minimum Generalization exclusive non-exclusive Inheritance Quick Recap

  20. Example: Jefferson Dance Club • The main entities • Teacher • Full time teacher • Part time teacher • Dance • Customer • Private Lesson • Group Lesson

  21. ER Diagram of the JDC Customer Pvt. Lesson Grp. Lesson Teacher Dance Part Time Full Time

  22. ER Diagram of the JDC N:2 Customer Pvt. Lesson Grp. Lesson Teacher Dance Part Time Full Time

  23. ER Diagram of the JDC N:M N:2 Customer Pvt. Lesson Grp. Lesson Teacher Dance Part Time Full Time

  24. ER Diagram of the JDC N:M N:2 Customer Pvt. Lesson Grp. Lesson N:2 Teacher Dance Part Time Full Time

  25. ER Diagram of the JDC N:M N:2 Customer Pvt. Lesson Grp. Lesson 1:N N:2 Teacher Dance Part Time Full Time

  26. ER Diagram of the JDC N:M N:2 Customer Pvt. Lesson Grp. Lesson 1:N N:2 Teacher N:M Dance Part Time Full Time

  27. Let’s try one ... • Nadara Records has decided to develop a database which stores information on musicians who play for their label. • You have been hired (at your usual rate of $2000/day) to design their new system. • The essential information you have gleaned through interviews with users is on the sheet provided.

  28. belongs Album 1:N produces N:1 Apartment Song Musician N:M 1:N records plays N:M Instrument

  29. Rules to live by • Start with obvious entities • these are the things that are important enough that the organization has given them names or identification numbers. • eg.: In a video store, MEMBER, TAPE are entities

  30. Rules... • An entity should have significance of its own. • even if we ignore everything else in the database design, the entity should still be important on its own… • Eg., MEMBER is important even if no tape is rented.

  31. Rules... • Make sure each entity has a primary attribute • There should be no multi-valued attributes • make sure that each attribute is such that each occurrence of the entity can have at most one value for that attribute - not a list of values.

  32. Finally….. • Not all constraints can be represented in the ER diagram.. • Eg.; suppose a customer is limited to borrowing 5 cassettes during one visit to the store. This cannot be represented in the ERD...

More Related