Upload
lee-simon
View
221
Download
0
Embed Size (px)
Citation preview
Entity-relationship diagrams
and generation
Jozef Kuper
Describe a Database Entities Atributes Relationships
ERD
Physical object, concept or event Entity represent table Attributes represent collums Primary key
ERD – Entity and atributes
Represented as a lines between entities May be labeled Don’t show single instance of relations Entity sets Relationships sets Optional relationship Mandatory relationship
ERD - Relationships
One-to-one One-to-many Many-to-many
Cardinality
Conceptual data model Useful to support documenting the data
architecture Logical data model Physical model
Levels of ER model
Unusual Used in large tables Safety
One-to-one
Most used Relationship 1:N | N:1 Primary key / Foreign key Classifications
Many-to-one
Can not be implemented Generated associated entity Combination of entity and relationship
Many-to-many
Some entity participates more than once in the relationship
Some common attributes <Employee>reports
to<Employee>(manager)
Recursive relation
Identify the entity Identify the entity’s attribute Identify Primary Keys Identify relations between entities Identify the Cardinality constraint
How to create ERD
Example
Thanks for your attention
Questions?