Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: What databases have taught me

Re: What databases have taught me

From: Neo <neo55592_at_hotmail.com>
Date: 23 Jun 2006 20:56:58 -0700
Message-ID: <1151121418.779736.33430@u72g2000cwu.googlegroups.com>


> Focusing on the easy part relieves you of the burden of thinking about the difficult questions of integrity and manipulation. That must be a good thing, right? I mean, if you had to come up with a query mechanism that could handle arbitrary ad hoc queries as simply as even SQL can, wouldn't that, like, totally harsh the buzz you got from reintroducing nested structures?

I would be interested to see if SQL's queries are simpler for highly variable data. Could someone post one equivalent to that in www.dbfordummies.com/Example/Ex117.asp

This example models a real estate listing. It models a $200,000 single-family house with MLS# A2868Z. The house has 3 bedrooms. The master bedroom is 25x30 and has biege Dupont carpet that was installed 1/1/2000. The second bedroom is 12x15 and has pink and purple carpet. The third bedroom is 12x15 and has hardwood flooring that was installed 1/2/1990 and needs resurfacing. The house has 3 bathrooms. The master bathroom has brass finished Moen faucets. The second is a hall bathroom and the third a half bathroom. The house has a 2-car attached garage. The house has 2 fireplaces, the first is made of brick and its hearth is made of stone. The second fireplace is made of stone and its hearth is made of stone also. The 15x20 kitchen has cork flooring and the following appliances: a white Maytag dishwasher, an Amana electric range, and a Sears side-by-side fridge that is brand new.

The example query (shown below) finds single-family listings that have a bedroom with purple carpet and a kitchen with a Sears fridge.

(and (select single-family instance *)

     (select * has (and (select bedroom instance *)
                        (select * has (and (select carpet instance *)
                                           (select * color purple)))))
     (select * has (and (select kitchen instance *)
                        (select * has (and (select fridge instance *)
                                           (select * mfg sears))))))

If needed, more listing and queries can be added for comparison with SQL. Received on Fri Jun 23 2006 - 22:56:58 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US