1 / 13

Entity Relationship Diagrams

Entity Relationship Diagrams. 3.3.1. This presentation covers. What is an Entity What is an Entity Relationship Diagram? Different types of relationships. Introduction. Systems can be confusing things. To help people understand what they are trying to design they often use diagrams.

Télécharger la présentation

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 3.3.1

  2. This presentation covers • What is an Entity • What is an Entity Relationship Diagram? • Different types of relationships

  3. Introduction • Systems can be confusing things. • To help people understand what they are trying to design they often use diagrams. • There are different styles of diagrams including: • Entity Relationship Diagrams • State Transition Diagrams • Data Flow Diagrams • Flowcharts • The type of diagram used will depend on the system being designed but a combination of diagrams can be used on the same project.

  4. Entity Relationship Diagrams • Also known as ERDs. • This diagram represents entities and the relationships between them. • We have already looked at these diagrams when we covered Normalisation back in AS Level...so this will be more of a refresher topic!

  5. Entities • Entities are ‘things’. • Each entity is made up of attributes. • For example, a is an entity. • It is made up of leaves... and other things.

  6. Entities • Strictly speaking... • The is also an entity...as it too is made up of different attributes!

  7. Types of Relationship • There are different types of relationship which you need to be aware of: • One-to-One • One-to-Many • Many-to-Many

  8. One-to-One • Assuming a teacher only taught in one classroom in a school... Teacher Classroom

  9. One-to-Many • A teacher has many lessons but a lesson can only have one teacher. Teacher Lesson

  10. Many-to-Many • A teacher has many students and a student can have many teachers. • Many-to-Many relationships are never ideal so a third table is often created. Teacher Students

  11. Fixing Many-to-Many • A third table is added to create two One-to-Many relationships. Teacher Students Class

  12. Developing the ERD • You must know the following things: • The entities • The attributes for each entity • The primary key for the entity • The foreign key(s) in each entity

  13. Something for you to do... • A small guesthouse registers its guests on a database. • Three of the entities used in the database are CUSTOMER, ROOM and BOOKING. • Draw an ERD to represent this part of the database.

More Related