I'm going to get a developer to create a new site for a car park which will include a booking system.
I want to understand how availability or occupancy would typically be modeled for a car park in a database or booking system.
Would you simply use count variable for each date, for example.
If the total number of cars booked in the car park was
4July08 = 9
5July08 = 10
6July08 = 4
and you were booking in a car from 4th to 6th July would you simply add +1 to each date count? So you would then have
4July08 = 10
5July08 = 11
6July08 = 5
I assume you would have a maximum occupancy variable also.
Is this typically how this type of thing would be modeled?
You would not store something you can calculate like this.
If your table stored the date a car was booked in, then ultimately, a count of the number of records with a specified date gives you this value.