I am writing an application which will extensively use calendar for storing the daily information on various things, for each entity. Now how do I make a new calendar for each entity. Do I make a table for each entry in the user table?
Edit:
I am having an entity user.
Now for each entity there is a calendar for the whole year. for each day in the year there are 2 fields which will have some data.
now how do i make that? should i create a new table for each user? or should i just use foreign key of the user and have 365 entries in the calendar table for each user.
Edit:
Each user will only have one event each day.
also since the events occur on some item of the user, and the user has many items, so one user can have multiple calendars.
You will have one table for Users and one table for Calendar. This is what I would start with:
Then you can do:
These models will only be a bonafide calendar when you render the events in a grid that looks like a calendar.