Hey there,
Got an interesting scenario I'd like to run past you guys re: DB architecture.
There will be two entities:
- Application: This is more or less the core of the app we are building. It has a start and end date along with about 15 other properties.
- CalendarEvent: This a less used entity. It has a start and end date with maybe 3 other properties.
The app we're building is mostly concerned with the applications. There will be a calendar page where both applications and events are listed however. Given the similarities between the entities (start and end dates) and the fact that there will be a page where they will both be listed, how would you cut this?
Ideas:
- Have an event table w/ start date, end date & type (application or calendarevent). Have an application table which references the event table. Have a calendarevent table which references the event table?
- Keep the tables seperate and use union in queries where both entities are required
Thanks in advance, Alex
EDIT: Leaning to towards the idea of having a "Period" table w/ start date and end date. Then both the "Application" and "CalendarEvent" tables can have a foreign key reference to a record in the period table.