I am prototyping a system that will allow users to book and pay for a connection on a charging station for their EVs in a certain location.
- they can book a connection for as long as they want
- they can reduce, extend or ask for refund.
- it could be possible that a booking doesn't have a transaction because there can be cases where we just want to turn on a connection for a user for free or if there's a promo.
- can add a new site with stations and connections (rarely).
- when a user selects a connection but doesn't pay for it, it has a 15-minute hold before it is released to be available again. I am planning to put this connection holds on redis for easier access instead of having another table for hold connections.
Here is the DB model I have so far. I am unsure how to connect site, station, and connection to the booking table. Should I just denormalize the 3 tables (site, station, and connection) into a table called 'connection'? since this is rarely updated or we rarely add a new site.