Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Entities and Attributes:

1. Company

 CompanyID (Primary Key)

 CompanyName

 RegistrationNumber

2. Bus

 BusID (Primary Key)

 CompanyID (Foreign Key)

 RegistrationNumber

 RouteID (Foreign Key)

3. Route

 RouteID (Primary Key)

 Origin

 Destination

4. Driver

 DriverID (Primary Key)

 Name

 LicenseNumber

5. BusDriverAssignment

 BusID (Foreign Key, Composite Key)

 DriverID (Foreign Key, Composite Key)

6. Passenger

 PassengerID (Primary Key)

 Name

7. Booking

 BookingID (Primary Key)

 PassengerID (Foreign Key)

 BusID (Foreign Key)

 JourneyDateTime
 BookingDateTime

8. Payment

 PaymentID (Primary Key)

 BookingID (Foreign Key)

 Amount

 PaymentDateTime

9. Journey

 JourneyID (Primary Key)

 BusID (Foreign Key)

 RouteID (Foreign Key)

 DriverID (Foreign Key)

 JourneyDateTime

 JourneyStatus

10. GPSData

 GPSDataID (Primary Key)

 BusID (Foreign Key)

 Latitude

 Longitude

 Timestamp

11. LatraReport

 ReportID (Primary Key)

 LatraID (Foreign Key)

 ActionTaken

 Remarks

 Date

12. Latra

 LatraID (Primary Key)

 Name
Relationships:

 One Company can operate Many Buses (One-to-Many relationship)

 One Bus can serve One Route (One-to-One relationship)

 One Bus can have Many Drivers (One-to-Many relationship)

 One Driver can drive Many Buses (One-to-Many relationship)

 One Passenger can make Many Bookings (One-to-Many relationship)

 One Booking is for One Passenger and One Bus (One-to-One relationship)

 One Booking can have One Payment (One-to-One relationship)

 One Bus can have Many GPS Data Points (One-to-Many relationship)

 One Bus can have Many Journeys (One-to-Many relationship)

 One Journey is associated with One Bus, One Route, and One Driver (One-to-One relationship)

 One Latra can file Many Reports (One-to-Many relationship)

More explanations

1. Company:

 Represents bus companies that operate within the system.

 Attributes include CompanyID (unique identifier), CompanyName, and


RegistrationNumber.

 Each company can operate multiple buses.

2. Bus:

 Represents individual buses operated by companies.

 Attributes include BusID (unique identifier), CompanyID (foreign key referencing


Company), RegistrationNumber, and RouteID (foreign key referencing Route).

 Each bus belongs to a specific company and serves a particular route.

3. Route:

 Represents the routes that buses follow.

 Attributes include RouteID (unique identifier), Origin, and Destination.


 Each route has a unique identifier and specifies the origin and destination locations.

4. Driver:

 Represents individual drivers employed by companies.

 Attributes include DriverID (unique identifier), Name, and LicenseNumber.

 Each driver has a unique identifier and is associated with one or more buses.

5. BusDriverAssignment:

 Represents the assignment of drivers to buses.

 Composite primary key (BusID, DriverID) establishes the relationship between buses and
drivers.

 Each bus can have multiple drivers, and each driver can be assigned to multiple buses.

6. Passenger:

 Represents passengers who make bookings within the system.

 Attributes include PassengerID (unique identifier) and Name.

 Each passenger has a unique identifier and can make multiple bookings.

7. Booking:

 Represents bookings made by passengers for specific journeys.

 Attributes include BookingID (unique identifier), PassengerID (foreign key referencing


Passenger), BusID (foreign key referencing Bus), JourneyDateTime, and
BookingDateTime.

 Each booking is associated with one passenger and one bus.

8. Payment:

 Represents payment transactions associated with bookings.

 Attributes include PaymentID (unique identifier), BookingID (foreign key referencing


Booking), Amount, and PaymentDateTime.

 Each payment is associated with one booking.

9. Journey:

 Represents individual journeys made by buses.

 Attributes include JourneyID (unique identifier), BusID (foreign key referencing Bus),
RouteID (foreign key referencing Route), DriverID (foreign key referencing Driver),
JourneyDateTime, and JourneyStatus.

 Each journey is associated with one bus, one route, and one driver.
10. GPSData:

 Represents GPS data points recorded for buses.

 Attributes include GPSDataID (unique identifier), BusID (foreign key referencing Bus),
Latitude, Longitude, and Timestamp.

 Each GPS data point is associated with one bus and records its location at a specific
timestamp.

11. LatraReport:

 Represents reports filed by Latra.

 Attributes include ReportID (unique identifier), LatraID (foreign key referencing Latra),
ActionTaken, Remarks, and Date.

 Each report is associated with one Latra personnel and contains details about actions
taken, remarks, and the date of filing.

12. Latra:

 Represents Latra personnel overseeing the system.

 Attributes include LatraID (unique identifier) and Name.

 Each Latra personnel has a unique identifier and is associated with multiple reports.

You might also like