BUS COMPANY

A Bus Company owns a number of buses. Each bus is allocated to a particular route, although some routes may have several buses. Each route passes through a number of towns. One or more drivers are allocated to each stage of a route, which corresponds to a journey through some or all of the towns on a route. Some of the towns have a garage where buses are kept and each of the buses are identified by the registration number and can carry different numbers of passengers, since the vehicles vary in size and can be single or double-decked. Each route is identified by a route number and information is available on the average number of passengers carried per day for each route. Drivers have an employee number, name, address, and sometimes a telephone number.

 

 

 

  • STEP 1:-

Identify the entities:-

  • Bus – Company owns busses and will hold information about them.
  • Route – Buses travel on routes and will need described.
  • Town – Buses pass through towns and need to know about them
  • Driver – Company employs drivers, personnel will hold their data.
  • Stage – Routes are made up of stages
  • Garage – Garage houses buses, and need to know where they are.

 

 

  • STEP 2:-

     Identify the relationships:-

1. A bus is allocated to a route and a route may have several buses.

• Bus-Route (m: 1) is serviced by

2. A route comprises of one or more stages.

• Route-Stage (1: m) comprises

3.One or more drivers are allocated to each stage

. • Driver-Stage (m: 1) is allocated

4.A stage passes through some or all of the towns on a route.

• Stage-Town (m: n) passes-through

5.A route passes through some or all of the towns

• Route-Town (m: n) passes-through

6.Some of the towns have a garage

• Garage-Town (1:1) is located in

7.A garage keeps buses and each bus has one `home’ garage

• Garage-Bus (m: 1) is garaged.

 

DBD ASSIGNMNENT RELATIONS

  • STEP 3:-

Identify the key attributes

  • Bus (reg-no)
  • Route (route-no)
  • Driver (EMP-no)
  • Town (name)
  • Stage (stage-no)
  • Garage (name)

 

 

  • STEP 4:-

Identify other attributes:-

  • Bus (make, size, deck, no-pass)
  • Route (avg-pass)
  • Driver(name, address, tel-no)
  • Town (state)
  • Stage
  • Garage(address)

 

 

 

  • STEP 5:-

 

 

E-R DIAGRAM……….

 dbd ass

 

Advertisements