Re: Impossible Database Design?

From: Jay Dee <ais01479_at_aeneas.net>
Date: Thu, 18 May 2006 19:06:50 GMT
Message-ID: <eB3bg.34660$mh.27945_at_tornado.ohiordc.rr.com>


Nikolai Onken wrote:
> Bob Badour wrote:
>
>

>>I strongly suspect some people come to the newsgroup not to learn but
>>because they are enamoured with their latest creation and think everyone
>>else should be just as enamoured.

>
>
> Bob, who are you refering to? :)
>
> I actually still haven't seen almost any marvelous creations in this
> thread and thats really what would make it interesting... we can keep
> writing about who knows better what infinite means or not :) maybe a
> simple SQL example would just make it clear?... (yeah and I know we
> don't still know anything about the requirements of a calendar and it
> is impossible to post an example without having them exactly down to
> the point... hell, calendars are really a pain in the axx :) )
> Ohh, and I really am curious how you would then design a simple
> calendar DB with say all functions like Outlook (Patterns included!)

I've done this. Some of my other responses hinted at the approach I used.

The key to success was that limitlessly recurring events (Are those the patterns to which you refer?) don't have to be made manifest until someone wants to look at a specific date interval in order to see what's on -- and can evaporate when the user isn't looking.

There were, of course, practical bounds: a calendar table was populated with a row for each date the system knew about -- 200 years seems right. That table held things like year, month, day, day of week, week of year. Something else held holidays generated from SQL which did "the second Sunday in May is Mother's Day." and "the first Sunday in September after Labor Day as National Grandparents Day." (Actually, that part was fun!) Something else stamped "beginning of quarter," "end of year," &c. all over the place.

With that in place, things like "the first Monday" and "the last Thursday" and the "latest business day on or before each payday" were easily handled. I glued a web interface on it and gave others on the intranet a button they could glue on their web sites. It was way cool -- especially since individuals with database privileges could roll their own "patterns."

The trick? (Ah, geez, do I have to tell you everything?) Obviously, not everything was in the data -- but the data necessary to generate the data were. (Is that too obscure?) The thing that spewed data looked like a table, but it wasn't. All the "patterns" were data and they - along with the calendar table - were sources for the thing that spewed data.

But if you want something "like Outlook (Patterns included!)" I'd say, "It already exists. It's called Outlook." Received on Thu May 18 2006 - 21:06:50 CEST

Original text of this message