I am trying to learn Microsoft MVC 2, and have in that case found a small project I wanted to deploy it on.
My idea was to simulate a restaurant where you can order a table.
Basics:
A user can only reserve a full table, so I don t have the trouble of merging people on different tables.
A person can order a table for a certain amount of hours.
My question was how I could make the data model the smartest way. I thought of just having a my database like this:
Table { Id, TableName }
Reservations { Id TableId ReservedFrom ReservedTo UserId }
User { UserId UserName ... }
By doing it this way I would have to program a lot of the logic in e.g. the business layer, to support which tables are occupied at what time, instead of having the data model handle it.
Therefore do you guys have a better way to do this?