[Developers] [Data-modeling] is everyone married to themselves?

David Huynh dfhuynh at csail.mit.edu
Wed Dec 19 02:54:26 UTC 2007


Alexios Zavras wrote:
> David Huynh wrote [edited]:
>   
>> So how would this query look like? My apologies for not being so 
>> familiar with MQL, but let me give it a shot (I'm using ! to reverse the 
>> properties):
>> [ {  "id": null,  "type": "school",
>>     "!studied_at": {
>>         "spouse_of": {
>>             "start": { "__name": "?start-of-marriage" },
>>             "end": { "__name": "?end-of-marriage" },
>>             "spouse": {
>>                 "position": {
>>                     "position": "/government/us_president",
>>                     "start": { "__name": "?start-of-position" },
>>                     "end": { "__name": "?end-of-position" }
>>                 }
>>             },
>>             "__where":
>>                 "overlap(date-range(?start-of-marriage, 
>> ?end-of-marriage), date-range(?start-of-position, ?end-of-position))"
>>         }  } } ]
>> Something like that?
>>     
>
> As someone who has once delved into the intricacies
> of time-ranges in databases, I must warn that this is
> a slippery path.
>
> I don't know about American constitution rules,
> but can a person be President for two non-consecutive terms ?
> In that case, there is no single "start-of" and "end-of".
>
> I know it can happen with marriages:
> As the most famous example I can think of,
> asnwer "Did Liz Taylor receive an award while being married
> to Richard Burton ?"
> >From wikipedia, they were married in the intervals
> (March 15, 1964 - June 26, 1974) *and*
> (October 10, 1975 - July 29, 1976).
>
> How do you model that ?
>
>   
You could model the marriages and the job positions as independent 
objects (reification in RDF).

David




More information about the Developers mailing list