| Version 6 (modified by , 11 months ago) ( diff ) | 
|---|
ER Diagram
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: None additional to those inherited from Account.
 
- Description: An entity that disjointly specializes from the 
- Entity: Student
- Description: A specialization of the Accountentity for students enrolled at universities.
- Primary Key: email.
- Attributes:
- university: The university the student attends.
- index: Unique student identifier.
 
 
- Description: A specialization of the 
- Entity: Account
- Description: Contains main information about application users.
- Primary Key: email.
- Attributes:
- name: User's first name.
- surname: User's last name.
- password: Encrypted user password.
 
 
- 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.
- Attributes:
- model: The specific model of the vehicle.
- brand: The manufacturer of the vehicle.
- capacity: The seating capacity of the vehicle.
- year_manufactured: Year the vehicle was manufactured.
 
 
- Entity: Automobile
- Description: A disjoint specialization of the Vehicleentity for cars.
- Primary Key: plate_num.
 
- Description: A disjoint specialization of the 
- Entity: Bus
- Description: A disjoint specialization of the Vehicleentity for buses.
- Primary Key: plate_num.
 
- Description: A disjoint specialization of the 
- Entity: Train
- Description: A disjoint specialization of the Vehicleentity for trains.
- Primary Key: plate_num.
 
- Description: A disjoint specialization of the 
- Entity: Van
- Description: A disjoint specialization of the Vehicleentity for vans.
- Primary Key: plate_num.
 
- Description: A disjoint specialization of the 
- 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).
- date: Scheduled date for the trip.
- free_seats: Derived attribute indicating available seats.
 
- status: The state of the trip (e.g., 
 
- 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 as capacity - free_seats).
- type_person_ticket: Discriminator for Student or Child Tickets.
 
 
- Description: Allows a user (
- Entity: Child Ticket
- Description: A disjoint specialization of the Ticketentity for passengers below a certain age.
- Primary Key: ticket_id.
- Attributes:
- discount: Discount applied to the ticket.
- embg: Personal ID of the child.
- parent_embg: Personal ID of the parent.
 
 
- Description: A disjoint specialization of the 
- Entity: Student Ticket
- Description: A disjoint specialization of the Ticketentity for student passengers.
- Primary Key: ticket_id.
- Attributes:
- discount: Discount applied to the ticket.
 
 
- 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:
- free_seats: Derived attribute indicating available seats.
 
 
- Entity: Transport Organizer
- Description: A disjoint specialization of the Accountentity for managing trips and schedules.
- Primary Key: email.
- Attributes:
- company_name: Name of the organization.
- company_embg: Unique company identifier.
 
 
- 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:
- years_exp: Number of years the driver has been active.
 
 
- Description: A disjoint specialization of the 
- 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 name of the location.
 
 
- Entity: Favorite
- Description: A weak entity representing a user's favorite routes.
- Primary Key: Composite key (email,favorite_id).
 
- Entity: Payment
- Description: A weak entity describing the process of purchasing tickets.
- Partial Key: payment_id- Artificial ID for the payment.
- Attributes:
- date: Payment date.
- num_tickets: Number of tickets purchased.
- total_price: Derived attribute.
 
 
Relationships
- leaves_a: 1:N Relation between AccountandReview.- Description: Indicates which account left a review for a trip.
 
- makes: 1:N Relation between AccountandPayment.- Description: Indicates which account made a specific payment.
 
- for_ticket: 1:N Relation between PaymentandTicket.- Description: Indicates which payment was made for which ticket.
 
- for_trip: 1:N Relation between TicketandTrip.- Description: Indicates which trip corresponds to a specific ticket.
 
- on: 1:N Relation between ReviewandTrip.- Description: Indicates which review was written for which trip.
 
- organizes: 1:N Relation between Transport OrganizerandRoute.- Description: Indicates which transport organizer is responsible for managing a specific route.
 
- owns: 1:N Relation between Transport OrganizerandVehicle.- Description: Indicates which transport organizer owns a specific vehicle.
 
- works_for: 1:N Relation between DriverandTransport Organizer.- Description: Indicates which transport organizer employs a specific driver.
 
- stops: 1:N Relation between RouteandLocation.- Description: Indicates which locations are part of a specific route.
 
- adds: 1:N Relation between AccountandFavorite.- Description: Indicates which favorite route is added by a specific account.
 
- linked: 1:N Relation between Ticketand its specialized types (e.g.,Student Ticket,Child Ticket).- Description: Indicates the specialization of a ticket for specific passenger categories.
 
- lists: 1:N Relation between AccountandTrip.- Description: Indicates which trips are attended by a specific account.
 
- drives_on: N:M Relation between DriverandRoute.- Description: Indicates which routes are driven by a specific driver.
 
- operates: N:M Relation between DriverandVehicle.- Description: Indicates which vehicles are operated by a specific driver.
 
- uses: N:M Relation between RouteandVehicle.- Description: Indicates which vehicles are used for a specific route.
 
- stops_at: N:M Relation between RouteandLocation.- Description: Indicates which locations are included as stops for a specific route.
 
- gets_on: N:M Relation between TicketandLocation.- Description: Indicates which location corresponds to a boarding point for a specific ticket.
 
- is_a: N:M Relation between RouteandFavorite.- Description: Indicates which routes are marked as favorites by specific accounts.
 
- for: N:M Relation between RouteandTrip.- Description: Indicates which trips belong to a specific route.
 
- back: N:M Relation between Two-Way TicketandRoute.- Description: Indicates the return route associated with a two-way ticket.
 
- forward: N:M Relation between Two-Way TicketandRoute.- Description: Indicates the outbound route associated with a two-way ticket.
 
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.
    

