W3C home > Mailing lists > Public > www-rdf-interest@w3.org > September 2003

Re: A quick intro to the RDF data model.

From: Charles McCathieNevile <charles@w3.org>
Date: Fri, 12 Sep 2003 06:31:01 -0400 (EDT)
To: "Thomas B. Passin" <tpassin@comcast.net>
Cc: www-rdf-interest@w3.org
Message-ID: <Pine.LNX.4.55.0309120618460.30647@homer.w3.org>

Actually there is a difference in this example. I can declare that a
restaurant is a Pho Restaurant, and that a Pho restaurant is a type of
Vietnamese restaurant. To do that in SQL you either change your query each
time you add something new, or you change your table to carry the extra
information.

And when you describe a place that does Bun Bo Hue (there are a lot of them
in Hue, and one near my house in melbourne) as a subtype of Pho restaurant it
gets harder again in SQL.

And if you're really keener on ethnic obscurities such as deep fried mars
bars, blood sausage and meat pudding with oysters, hamburgers and fried
balls of mashed potato, the ability to describe predicates is pretty useful -
redefining the meaning of 'ethnic' is a pretty common activity.

Personally I'm going for Japanese food, but not the kind developed in
California...

cheers

Chaals

On Thu, 11 Sep 2003, Thomas B. Passin wrote:

>"SELECT ?name, ?price
>        FROM restaurants.nt
>        WHERE
>        (?x rdf::type wn::Restaurant)
>        (?x fp::costsAbout ?price)
>        (?x _::isCalled ?name)
>        (?x fp::hasMenuItem ?c)
>(?c rdf::type wn:EthnicCuisine)
>        USING
>        rdf for http://www.w3.org/1999/02/22-rdf-syntax-ns#
>        fp for http://www.chefmoz.org/syntax#
>        wn for http://xmlns.com/wordnet/1.6/
>        _ for <>"
>
>select name, cost
>from menu join restaurants
>where cuisine in ['Chinese', 'Vietnamese', 'Thai']
>and restaurants.approximate_price < 16
>and restaurants.approximate_price > 9
>
>What's that, you say?  This SQL query had to specifically list all the
>ethnic cuisines?  Well, guess what?  You have to do that with RDF too, in
>order to tag them "with rdf::type wn:EthnicCuisine".  You just list them in
>a different place.  And the list in the SQL query could have been obtained
>from a query over a "ethnic_cuisine" table.  Similar remarks hold for the
>approximate price - somewhere you have to define what that "fp::costsAbout"
>predicate means.  So even in this example there is virtually no difference
>between the relational database and the RDF example.
>
>You cannot show why RDF is desirable by showing how it does the same things
>as a relational database only more clumsily and with less chance for
>optimization.  You have to get at the differences.  I think that these
>include -
>
(a list of useful featuress)
Received on Friday, 12 September 2003 06:31:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:52:02 GMT