I have a database for modelling a rental business. The database stores information for multiple Suppliers (owners) and each Supplier has a subset of depots. Each depot is closed certain days of the year, some are specific to that depot (might be closed every saturday or a whole week at thanksgiving) and others are global (all depots are closed christmas. I am trying to figure out the best way to model this.
My first thought was to have a DepotClosed table as follows:
depotclosed
id (PK) INT
start_date DATE
end_date DATE
display VARCHAR
global BOOLEAN
depot_id (FK)
My issue with this is that when it's a global holiday the depot_id will be null, but it's not "undefined", the holiday is just for all depots. Maybe I am just making more of a deal out of this than I ought to. Any thoughts would be welcome.
Thanks