Subject: Re: SQL virtual schema psudo proposal

From: "John Stracke" <[email-masked]>
Date: Fri, 11 Jan 2002 10:31:45 -0500

>What if we said:

This almost works.  The problem with properties being tables, and 
subcomponents being tables, and all the tables automatically getting 
joined in, is that you can't distinguish between properties in the 
component and properties in the subcomponent.  For example, say you've got 
an event containing a repeating alarm.  DURATION.VALUE could refer either 
to the duration of the event or the duration of the interval between alarm 
repeats.  You'd have to extend SQL to support multiple "."s, to give 
VALARM.DURATION.VALUE.

And you still wouldn't be able to do coherent queries on a property that 
appears more than once; the query:

SELECT * FROM VEVENT WHERE ATTENDEE.PARTSTAT='ACCEPTED' AND 
ATTENDEE.VALUE=[email-masked]'

would still have no way of making sure that the PARTSTAT and the VALUE 
came from the same row in the ATTENDEE table.

/=============================================================\
|John Stracke                   |Principal Engineer           |
[email-masked]  |Incentive Systems, Inc.      |
|http://www.incentivesystems.com|My opinions are my own.      |
|=============================================================|
|"I think we'd get fewer bug reports if we stopped selling our|
|software off planet."                                        |
\=============================================================/

---

From: Doug Royer <[email-masked]>
Date: Fri, 11 Jan 2002 12:09:22 -0700

> repeats.  You'd have to extend SQL to support multiple "."s, to give

There is no PROPERTY or PARAMATER caled 'VALUE'.

If you want the DRUATION from the VEVENT:

	SELECT DURATION FORM VEVENT

If you want the DURATION from the VALARM and you want to
know where it came from:

	SELECT UID,VALARM FROM VEVENT

And the CUA sorts out the iCalendar objects that come back
that contain the entire VALARMs.

So, VALARM.DURATION would get you the PROPERTY - all of it in iCalendar
format.

If you did just want the DURATION from the VALARMS:

	SELECT DURATION FROM VALARM

> ATTENDEE.VALUE=[email-masked]'

You have already broken the rules.
You used ATTENDEE in the WHERE clause and 'ATTENDEE' is not the value
in the FROM clause. You did a join.

> came from the same row in the ATTENDEE table.

I am proposing that we force the CUA to do more work by
not allowing those cross-virtual-table joins.

You would have to: