On Fri, 29 Apr 2005, Flavio S. Glock wrote:
Dave Rolsky wrote:[...]Has anyone done any work on this?
Basically, I'd like to be able to store these in a way that makes queries like "all the entries for a given month" reasonably efficient.
What I'd really like to see is some way to query both single events and recurring events within a given timeframe, all in one query that returns a sorted array of occurrences.
Build one table for each data type: RECURRENCES - populated with ICal strings DATES - populated with SQL native datetimes SPANS - populated with SQL native datetime spans
- Slurp all RECURRENCES using DT::Format::ICal; query the recurrences using Perl.
- Query DATES and SPANS using SQL.
That doesn't really cut it. One of the main advantages of a DBMS is you can fetch _just_ the data you want, and get it returned in a sorted order.
If I have fetch some data from the DBMS directly, and then mix it with Perl-generated data, it's a mess.
-dave
/*=================================================== VegGuide.Org www.BookIRead.com Your guide to all that's veg. My book blog ===================================================*/