|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
ER diagram for online diary
Hi folks, hope you can help.
I've had a search but can't find anything of help. Basically I am creating an online diary (using php and mysql) and am a bit puzzled by how to structure the db. The diary will contain day, month, year etc and will be subdivided into 1/2 hour increments i.e. 8:30, 9:00, 9:30 and so on. You will also be able to add an appointment for these times or spanning a number of these times. I want to know if there is a standard tried and tested method for doing something like this? My thoughts so far have been to store date (with primary key of day, month, and year) and time as seperate entities and then have an appointments entity which has date and time as foreign keys. Otherwise have one entity which would have attributes day, month, year, time as primary keys and another attribute appointment. I'm unsure about both of these approaches and it occured to me that there is probably an accepted way to do this given the amount of online diaries that are available. hope you knowledgable people can give me some help |
|
#2
|
||||
|
||||
|
I would have just
Field 1 as the ID for the entry Field 2 as the Date start Field 3 as the Date end Field 4 as the Text .... keep going till you got all the fields Then you print out the day or week using your programming code and then just fill in be times according to the dates in the db. I hope this has made some sense ![]() |
|
#3
|
|||
|
|||
|
thanks, that does help...still got some figuring out to do but it's put me on the right track.
|
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > ER diagram for online diary |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|