Changes between Version 16 and Version 17 of RelationalSchema
- Timestamp:
- 01/09/25 12:36:54 (6 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RelationalSchema
v16 v17 13 13 === Relations - Relational Schema === 14 14 15 `ACCOUNT`(__** email**__, name, surname, password)15 `ACCOUNT`(__**account_id**__, account_email, name, surname, password) 16 16 17 `TRANSPORT_ORGANIZER`(__***account_ email**__ (`ACCOUNT`), company_name, company_embg)17 `TRANSPORT_ORGANIZER`(__***account_id**__ (`ACCOUNT`), company_name, company_embg) 18 18 19 `ADMIN`(__***account_ email**__ (`ACCOUNT`))19 `ADMIN`(__***account_id**__ (`ACCOUNT`)) 20 20 21 `STUDENT`(__***account_ email**__ (`ACCOUNT`), university, index)21 `STUDENT`(__***account_id**__ (`ACCOUNT`), university, index) 22 22 23 `DRIVER`(__***account_ email**__ (`ACCOUNT`), years_experience, *works_for_email(`TRANSPORT_ORGANIZER`))23 `DRIVER`(__***account_id**__ (`ACCOUNT`), years_experience, *works_for_id(`TRANSPORT_ORGANIZER`)) 24 24 25 `VEHICLE`(__** plate_num**__, model, brand, capacity, year_manuf)25 `VEHICLE`(__**vehicle_id**__, plate_num, model, brand, capacity, year_manuf) 26 26 27 `AUTOMOBILE`(__*** plate_num**__ (`VEHICLE`))27 `AUTOMOBILE`(__***vehicle_id**__ (`VEHICLE`)) 28 28 29 `TRAIN`(__*** plate_num**__ (`VEHICLE`))29 `TRAIN`(__***vehicle_id**__ (`VEHICLE`)) 30 30 31 `BUS`(__*** plate_num**__ (`VEHICLE`))31 `BUS`(__***vehicle_id**__ (`VEHICLE`)) 32 32 33 `VAN`(__*** plate_num**__ (`VEHICLE`))33 `VAN`(__***vehicle_id**__ (`VEHICLE`)) 34 34 35 `DRIVER_VEHICLE_OPERATION`(__***driver_ email**__(`DRIVER`), __***plate_num**__(`VEHICLE`))35 `DRIVER_VEHICLE_OPERATION`(__***driver_id**__(`DRIVER`), __***vehicle_id**__(`VEHICLE`)) 36 36 37 `TRIP`(__**trid_id**__, __***transport_organizer_ email**__(`TRANSPORT_ORGANIZER`), __***route_id**__(`ROUTE`), free_seats, date, status)37 `TRIP`(__**trid_id**__, __***transport_organizer_id**__(`TRANSPORT_ORGANIZER`), __***route_id**__(`ROUTE`), free_seats, date, status) 38 38 39 `DRIVES_ON`(__***driver_ email**__(`DRIVER`), __***trip_id**__(`TRIP`))39 `DRIVES_ON`(__***driver_id**__(`DRIVER`), __***trip_id**__(`TRIP`)) 40 40 41 `ROUTE`(__**id**__, *transport_organizer_ email(`TRANSPORT_ORGANIZER`), *from_loc (`LOCATION`), *to_loc (`LOCATION`))41 `ROUTE`(__**id**__, *transport_organizer_id(`TRANSPORT_ORGANIZER`), *from_loc (`LOCATION`), *to_loc (`LOCATION`)) 42 42 43 43 `DAY_ACTIVE`(__***route_id**(`ROUTE`) __**day**__) 44 44 45 `LOCATION`(__**l atitude**__, __**longitude**__, name)45 `LOCATION`(__**location_id**__, latitude, longitude, name) 46 46 47 47 `TRIP_STOPS`(__***trip_id**__(`TRIP`), __***location**__, time) 48 48 49 `TICKET`(__**id**__, *trip_id(`TRIP`), *gets_on_loc (`LOCATION`), *gets_off_loc (`LOCATION`), *account_ email(`ACCOUNT`), date_purchased, time_purchased, price, seat)49 `TICKET`(__**id**__, *trip_id(`TRIP`), *gets_on_loc (`LOCATION`), *gets_off_loc (`LOCATION`), *account_id (`ACCOUNT`), date_purchased, time_purchased, price, seat) 50 50 51 51 `TICKET_RELATIONS`(*parent_ticket_id(`TICKET`), *child_ticket_id(`TICKET`)) … … 55 55 `CHILD_TICKET`(__***ticket_id**__ (`TICKET`), discount, embg, parent_embg) 56 56 57 `PAYMENT`(__**payment_id**__, __***account_ email**__ (`ACCOUNT`), date, total_price, n_tickets)57 `PAYMENT`(__**payment_id**__, __***account_id**__ (`ACCOUNT`), date, total_price, n_tickets) 58 58 59 `FAVORITE`(__***route_id**__(`ROUTE`), __***account_ email**__ (`ACCOUNT`))59 `FAVORITE`(__***route_id**__(`ROUTE`), __***account_id**__ (`ACCOUNT`)) 60 60 61 `REVIEW`(__**review_id**__, __***account_ email**__ (`ACCOUNT`), *ticket_id, description, rating)61 `REVIEW`(__**review_id**__, __***account_id**__ (`ACCOUNT`), *ticket_id, description, rating) 62 62 63 63 == DDL - Creation and Deletion of Tables == 64 64 [attachment:routemk_create_and_delete.sql RouteMK_Create_and_Delete] 65 65 == Relational Schema Diagram == 66 [[Image(Route _MK_RD_2.png)]]66 [[Image(RouteMK-Relational-Schema.jpg)]]