2 tables - days of week and events - best structure?
Posted by:
Date: July 06, 2011 11:43AM

hi everyone

in my website im having a section where there is a set of daily offers for each day of the week. for example sunday may have "2 for 1 on bottled beers" and "sunday carvery". however, monday may also have the same "2 for 1 on bottled beers offers".

in other words, each daily offer item can appear on several days, but at the same time each day can have more than one different offer. this would therefore be a many to many relationship?

currently my table structure is:

daysofweek - day_id, dayname
dailyoffers - offer_id, offer_details, day_id

at the minute, that would seem ok as long as each dailyoffer was only on one day due to it referencing the day_it. if i wanted to have that same offer on several days, then it would mean i would currently need to create a new record with duplicate information but a different day_id.

is there any way at all that i can structure it so that i can store multiple day_id's in just the one record?

or does anyone have any better suggestions on how i can structure the tables?

bearing in mind that i am going to be writing a basic CMS to update and handle all this information.

thanks

Options: ReplyQuote


Subject
Written By
Posted
2 tables - days of week and events - best structure?
July 06, 2011 11:43AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.