Re: A neutral challenge.

From: Bob Badour <bbadour_at_golden.net>
Date: Wed, 25 Jun 2003 20:17:28 -0400
Message-ID: <FPrKa.542$5O7.72062052_at_mantis.golden.net>


"Peter Koch Larsen" <pkl_at_mailme.dk> wrote in message news:3efa255f$0$24623$edfadb0f_at_dread14.news.tele.dk...
>
> "Bob Badour" <bbadour_at_golden.net> skrev i en meddelelse
> news:PykKa.513$ZO6.69202991_at_mantis.golden.net...
> > "Peter Koch Larsen" <pkl_at_mailme.dk> wrote in message
> > news:61c84197.0306250318.71c26eca_at_posting.google.com...
> > > Costins challenge was interesting to me, being unfamiliar with oo-dbms
> > > systems. I was not sure that it was quite fair, however, it being very
> > > much non oo-like.
> > > I grab the opportunity to propose another challenge to a conceptually
> > > very simple problem: scheduling of a meeting.
> > >
> > > Consider a group of persons who are to have a meeting. This meeting
> > > has to take place at a time where no other meeting for the people
> > > involved takes place, of course.
> > > Each person has a calender where the available (or if you prefer so,
> > > the unavailable time) for that person is noted. As an example, John
> > > might have this calender:
> > >
> > > Mon:
> > > 11-16: available
> > > Tuesday:
> > > 9-11: available
> > > 13-16: available
> > >
> > > Andrea might have this calender.
> > >
> > > Monday:
> > > 9-15: available
> > > Tuesday:
> > > 10-12: available
> > > 13-16: available
> > >
> > > The program should list periods where alle attendees are available.
> > > For John and Andrea, the result would be:
> > >
> > > Available:
> > > Monday:
> > > 11-15
> > > Tuesday:
> > > 10-11
> > > 13-16
> > >
> > > The user should then be able to pick one of the available time-frames
> > > and let the system schedule the meeting at that frame.
> > >
> > > I believe this challenge is interesting for both camps as this is a
> > > realistic problem that often has to be solved in practival life. Also
> > > this gives the oo-oriented camp the possibility to have some slight
> > > form of object-orientation (the intervals) and it is not a problem,
> > > that may be modeled directly via some relational join-operation.
> > > After having solved this problem, it would be interesting to extend
> > > the solution to involve not only persons but also other kind of
> > > resources (e.g. a conference room and a projector). What changes would
> > > you hace to but into the original solution (assuming of course that
> > > this problem had been anticipated berforehand).
> > > I do not propose to solve this problem myself, but it would be
> > > interesting to see if others could sketch a solution using their own
> > > favorite DBMS. Of course, the solution must be sound with regards to
> > > criteria such as time-consumption and safety w.r.t. multiple updates.
> > >
> > > Kind regards
> > > Peter
> >
> > Does 'Monday' represent a specific date or a recurring availability on
> every
> > monday?
> >
> >
>
> My intention was that "Monday" was a specific date. Recurring
time-schedules
> could be a fringe benefit if implemented. A vague description was
> intentional, however (although perhaps not wrt. dates ;-), as the proper
> layout of tables and so on could possibly be influenced by the chosen
> language.

When I attended Chris Date's UCLA Extensions course last year, it occured to me that subtypes and type generators go a long way to expressing many recurring events as intervals. If THIRD_THURSDAY is a subtype of THURSDAY is a subtype of DAY, one might express an event on the third thursday of every month using an interval type INTERVAL_THIRD_THURSDAY.

The gaps one must cross are that INTERVAL_THIRD_THURSDAY is neither a subtype of INTERVAL_THURSDAY nor of INTERVAL_DAY and that the calendar probably schedules events at a finer granularity than days. One would need a way of recasting interval types so that the third thursdays in one type of interval become days in a different type of interval, and then combine those days with a time of day to construct finer granularity schedules.

Obviously declaring types for THIRD_THURSAY and SECOND_WEDNESDAY etc. would be tedious, so I think type generators for various date and time granularities probably make sense too.

Back to the scheduling problem you propose, what granularity of schedule did you envision? I notice all the times are even hours. Is that just incidental? Or do you propose a calendar to schedule events on an hourly basis? Received on Thu Jun 26 2003 - 02:17:28 CEST

Original text of this message