You are on page 1of 8

The Entity-Relationship

Modelling
The Entity-Relationship Modelling
• The Entity-Relationship (ER) approach is based on the ER
model originally proposed by Peter in 1976 as a way to unify
the network and relational database views.
• ER model is a conceptual data model that views the real
world as entities and relationships.
• Entity-Relationship diagram is used to visually represent data
objects.
The Entity-Relationship Modelling
For database specialists, the utility of the ER model is:
• It maps well to the relational model. The constructs used in the
ER model can easily be transformed into relational tables.
• It is simple and easy to understand with a minimum of training.
Therefore, the model can be used by the database team to
communicate the design to the end user.
• can be used as a design plan by the database developer to
implement a data model in specific database management
software.
Entities
Bus - Company owns busses and will hold information about them.
1. Route - Buses travel on routes and will need described.
2. Town - Buses pass through towns and need to know about them
3. Driver - Company employs drivers, personnel will hold their data.
4. Stage - Routes are made up of stages
5. Garage - Garage houses buses, and need to know where they
are.
Relationships
1. A bus is allocated to a route and a route may have several buses.
2. Bus-route (m:1) is serviced by
3. A route comprises of one or more stages.
4. route-stage (1:m) comprises
5. One or more drivers are allocated to each stage.
6. driver-stage (m:1) is allocated
7. A stage passes through some or all of the towns on a route.
Relationships
8. stage-town (m:n) passes-through
9. A route passes through some or all of the towns
10. route-town (m:n) passes-through
11. Some of the towns have a garage
12. garage-town (1:1) is situated
13. A garage keeps buses and each bus has one `home' garage
14. garage-bus (m:1) is garaged
Drawing of an E-R Diagram(for Country Bus Company)
Attributes
1. Bus (reg-no,make,size,deck,no-pass)
2. Route (route-no,avg-pass)
3. Driver (emp-no,name,address,tel-no)
4. Town (name)
5. Stage (stage-no)
6. Garage (name,address)

You might also like