entity relationship diagrams
Post on 30-Dec-2015
38 Views
Preview:
DESCRIPTION
TRANSCRIPT
3.3.1
• What is an Entity
• What is an Entity Relationship Diagram?
• Different types of relationships
• 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.
• 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.
• Strictly speaking...
• The is also an entity...as it too is
made up of different attributes!
• There are different types of relationship which you need to be aware of:
– One-to-One– One-to-Many– Many-to-Many
• Assuming a teacher only taught in one classroom in a school...
TeacherTeacher ClassroomClassroom
• A teacher has many lessons but a lesson can only have one teacher.
TeacherTeacher LessonLesson
• 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.
TeacherTeacher StudentsStudents
• A third table is added to create two One-to-Many relationships.
TeacherTeacher StudentsStudents
ClassClass
top related