Subject Re: [ib-support] what's the best database design for this problem...
Author Paul Schmidt
On 15 Dec 2001, at 11:07, zifnabbe wrote:

> Hi,
>
> I'm developing an appointment system. The users are able to enter
> holidays on which no appointment is possible. They are also capable of
> telling which periods in a day are possible to make appointments
> (overbooking parameter, etc)... The holidays and time periods should
> be adaptable.
>
> Now, so far I made for this problem 3 tables:
>
> 1. The appointment table (containing the appointments)
> 2. The Holiday table (containing the days on which no appointments are
> possible) 3. The Planning Table (containing the periods on which an
> appointment is possible)
>
> With code I would find a correct appointment and add that into the
> appointment table.
>
> Now, I don't know if this is the right approach... Are there better
> approaches?
>
> Eg. Usage of only one table, in which you have a parameter which says
> the entry is an appointment or a not possible day,period.

Less is usually more, when it comes to table design, what I mean
is that reducing the table count, usually just makes the code more
complex, and the database less efficient. Especially if you have
a large number of users, and your using client/server. Technically
the best thing to do, is go through the normalization process, then
decide how many levels are practical, for your application. If you
don't know what normalization is, or how to do it, then get a good
basic SQL book that explains it, The book I use for most of my
SQL stuff, is Instant SQL Programming by Joe Celko, it's not IB
specific, but it does have the basics of SQL including how to
normalize a database.

Paul






> Or, just I make a temporary, view table, which combines the three
> tables into one?
>
> I imagine some of you, more experienced database applications, know
> how to tackle such problem in the best way. I hope you would like to
> share your knowledge with me.
>
> Thanks in advance!
>
> Tom.
>
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~--> Need new boots for winter? Looking for a
> perfect gift for your shoe loving friends? Zappos.com is the perfect
> fit for all your shoe needs!
> http://us.click.yahoo.com/ltdUpD/QrSDAA/ySSFAA/dpFolB/TM
> ---------------------------------------------------------------------~
> ->
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>


Paul Schmidt
Tricat Technologies
paul@...
www.tricattechnologies.com