On Fri, Apr 29, 2005 at 12:51:46PM -0500, Dave Rolsky wrote:
> On Fri, 29 Apr 2005, kellan wrote:
> 
> >Actually recurrence exceptions are one really good reason why its hard
> >to ever come up with an elegant, purely rule based recurrence
> >representation.  For events involving humans its inevitable that
> >sometimes this month's occurrence will get cancelled or re-scheduled.
> 
> Well, the trick is to make complex recurrences like this an actual data 
> type in the DBMS.
> 
>  SELECT ...
>    FROM RecurringEvent
>   WHERE OVERLAPS(recurrence, $start_date, $end_date)
>  UNION
>  SELECT ...
>    FROM Event
>   WHERE start_date >= $start_date
>     AND end_date <= $end_date
> 
> See how nice and simple that is ;)
> 
> Surely implementation of that data type is just a SMOP!
> 
> Hehe.  Actually, if there were a DBMS that supported writing custom data 
> types in Perl we'd be a long way towards that goal.

[Idle comment from the peanut gallery] I wonder if recurrences could be
mapped to OpenGIS Geometry Model using some arbitrary mapping.

Then to check for OVERLAPS(...) you'd use INTERSECTION(...)

Just a thought...

Tim.

p.s. Since Postgres has been mentioned already I'll mention MySQL :)
http://dev.mysql.com/doc/mysql/en/spatial-extensions-in-mysql.html

Reply via email to