| Version 4 (modified by , 11 months ago) ( diff ) |
|---|
ER Diagram
Data Requirements
Entities
- Entity: Admin
- Description: An entity that disjointly specializes from the
Accountentity and uniquely identifies administrators of the system. - Primary Key:
email- Entered when creating the account. - Attributes:
- Description: An entity that disjointly specializes from the
- Entity: Vehicle
- Description: Generalization entity for all means of transport available on the system.
- Primary Key:
plate_num- The registration/plate number of the vehicle. - Candidate Key: Composite key of
brandandmodel(not used sinceplate_numis a superkey). - Attributes:
model: The specific model of the vehicle.brand: The manufacturer of the vehicle.capacity: The seating capacity of the vehicle.
- Entity: Trip
- Description: A weak entity representing an instance of a route, used to check information about tickets purchased for a route.
- Partial Key:
trip_id- An artificial ID of a trip. - Attributes:
status: The state of the trip (e.g.,completed,cancelled,in progress).
- Entity: Review
- Description: A weak entity describing user ratings for a trip.
- Partial Key:
review_id- An artificial ID for the review. - Attributes:
description: User-provided context about the trip.rating: An integer rating (out of 5).
- Entity: Ticket
- Description: Allows a user (
Account) to reserve a place on a route. - Primary Key:
ticket_id- An artificial ID for the ticket. - Attributes:
price: The base price for the ticket.date_purchased: The date the ticket was purchased.seat: Derived attribute (calculated ascapacity - free_seats).
- Description: Allows a user (
- Entity: Automobile
- Description: A disjoint specialization of the
Vehicleentity, identifying cars. - Primary Key:
plate_num. - Attributes:
- Description: A disjoint specialization of the
- Entity: Bus
- Description: A disjoint specialization of the
Vehicleentity, identifying buses. - Primary Key:
plate_num. - Attributes:
- Description: A disjoint specialization of the
- Entity: Train
- Description: A disjoint specialization of the
Vehicleentity, identifying trains. - Primary Key:
plate_num. - Attributes:
- Description: A disjoint specialization of the
- Entity: Van
- Description: A disjoint specialization of the
Vehicleentity, identifying vans. - Primary Key:
plate_num. - Attributes:
- Description: A disjoint specialization of the
- Entity: Route
- Description: Describes a scheduled/frequent route between two or more places.
- Primary Key:
id- An artificial ID for the route. - Attributes:
date: Scheduled date(s) for the route.free_seats: Derived attribute indicating available seats.
- Entity: Child Ticket
- Description: A disjoint specialization of the
Ticketentity for passengers below a certain age. - Primary Key:
ticket_id. - Attributes:
pricepurchase_datediscountSSNparent_SSN
- Description: A disjoint specialization of the
- Entity: One-Way Ticket
- Description: A disjoint specialization of the
Ticketentity for one-direction travel. - Primary Key:
ticket_id. - Attributes:
pricepurchase_date
- Description: A disjoint specialization of the
- Entity: Two-Way Ticket
- Description: A disjoint specialization of the
Ticketentity for round-trip travel. - Primary Key:
ticket_id. - Attributes:
expiration_period: Time the ticket is valid.purchase_datepriceexpiration_date: Derived attribute (purchase_date + expiration_period).
- Description: A disjoint specialization of the
- Entity: Account
- Description: Contains main information about application users.
- Primary Key:
email. - Attributes:
namesurnamepassworduniversity: Where the student studies.student_index
- Entity: Transport Organizer
- Description: A disjoint specialization of the
Accountentity for managing trips and schedules. - Primary Key:
email. - Attributes:
namesurnamepasswordcompany_namecompany_CIN
- Description: A disjoint specialization of the
- Entity: Driver
- Description: A disjoint specialization of the
Accountentity for individuals responsible for vehicle operation. - Primary Key:
email. - Attributes:
namesurnamepassword
- Description: A disjoint specialization of the
- Entity: Student
- Description: A disjoint specialization of the
Accountentity for students enrolled at Macedonian universities. - Primary Key:
email. - Attributes:
namesurnamepassworduniversity
- Description: A disjoint specialization of the
- Entity: Favorite
- Description: A weak entity representing a user's favorite routes.
- Primary Key: Composite key (
email, partial key for each favorite route). - Attributes:
- Entity: Location
- Description: Contains geographical points for route stops (along the way or final destinations).
- Primary Key: Composite key (
latitude,longitude). - Attributes:
time: Estimated arrival time.name: Descriptive local names.
- Entity: Payment
- Description: A weak entity describing the process of purchasing tickets.
- Partial Key: artificial ID
payment_id. - Attributes:
datenum_ticketstotal_price: Derived attribute.
Relationships
- makes: 1:N Relation between
AccountandPayment.- Description: Tells which payment was made by which account and is used as an identifying relation for a payment.
- leaves_a: 1:N Relation between
AccountandReview.- Description: Tells which review was left by which user. This relation identifies the entity
Review.
- Description: Tells which review was left by which user. This relation identifies the entity
- adds: 1:N Relation between
AccountandFavorite.- Description: Tells which account added which route to favorites. This relation identifies the entity
Favorite.
- Description: Tells which account added which route to favorites. This relation identifies the entity
- for_ticket: 1:N Relation between
PaymentandTicket.- Description: Tells which payment was made for which ticket.
- works_for: 1:N Relation between
Transport OrganizerandDriver.- Description: Tells which driver works for which transport organizer.
- on: 1:N Relation between
ReviewandTrip.- Description: Tells which review was left on which trip. This relation identifies the entity
Review.
- Description: Tells which review was left on which trip. This relation identifies the entity
- organizes: 1:N Relation between
Transport OrganizerandRoute.- Description: Tells which transport organizer organized which route.
- is_a: 1:N Relation between
RouteandFavorite.- Description: Tells which route is favorited by which account. This relation identifies the entity
Favorite.
- Description: Tells which route is favorited by which account. This relation identifies the entity
- for: 1:N Relation between
RouteandTrip.- Description: Tells which route was made for which trip. This relation identifies the entity
Trip.
- Description: Tells which route was made for which trip. This relation identifies the entity
- on: 1:N Relation between
RouteandOne-Way Ticket.- Description: Tells which route was bought by which one-way tickets.
- back: 1:N Relation between
RouteandTwo-Way Ticket.- Description: Tells which route was purchased as part of a two-way ticket for the return journey.
- forward: 1:N Relation between
RouteandTwo-Way Ticket.- Description: Tells which route was purchased as part of a two-way ticket for the outbound journey.
- owns: 1:N Relation between
Transport OrganizerandVehicle.- Description: Tells which transport organizer owns which vehicle.
- stops_at: N:M Relation between
RouteandLocation.- Description: Tells which locations are included as stops on specific routes.
- operates: N:M Relation between
DriverandVehicle.- Description: Tells which vehicles are operated by which drivers.
- uses: N:M Relation between
RouteandVehicle.- Description: Tells which vehicles are used on which routes.
- drives_on: N:M Relation between
RouteandDriver.- Description: Tells which drivers drive on which routes.
- lists: N:M Relation between
AccountandTrip.- Description: Tells which account has been on which trips.
Attachments (5)
- ERModel_RouteMK.png (204.1 KB ) - added by 11 months ago.
- er-model-routemk_final.png (202.6 KB ) - added by 11 months ago.
- er-model-routemk_final.2.png (200.4 KB ) - added by 11 months ago.
- er-model-routemk_final3.png (207.0 KB ) - added by 10 months ago.
- RouteMK_er_revised.png (101.1 KB ) - added by 5 weeks ago.
Download all attachments as: .zip
Note:
See TracWiki
for help on using the wiki.
