CRUD

Summary of the Create / Read / Update / Delete operations on the database (the new architecture).

Create

  • Administrator:
    • Add a station (specify the name)=> create a Station.
    • Create a schedule (specify the stations in order and the time between them, specify the start time of the schedule) => create a Schedule, and all the corresponding Map rows (also query Station for names)
  • User:
    • Create a user account => create an entry in User
    • Add a booking => create a Booking row

Read

  • Administrator:
    • View/search current stations => query Station table
    • View/search current schedules => query Schedule, Map, and Station (querying Station is needed to get the station name)
    • View/search bookings or booking statistics => query Booking, Schedule, User
  • User:
    • View/search current schedules => (same as above)
    • View bookings they have made => query Booking, Schedule, User

Update

  • Administrator:
    • (rare) Change a station name => update Station
    • all other updates are just apparent (i.e. simulated in the UI); they are actually delete and create operations, possibly with a cache for higher performance
  • User: (same as the second above)

Delete

  • Administrator:
    • Delete schedule => delete a row from Schedule, all corresponding Map and Booking rows (a warning is needed here if bookings have been made)
    • Delete station => delete from Station
  • User:
    • Cancel a booking => delete from Booking
    • Delete an account => delete from User, and all corresponding bookings

Disponibil și în: HTML TXT