Re: MultiValue Databases

From: Jon Heggland <heggland_at_idi.ntnu.no>
Date: Mon, 13 Jun 2005 10:09:56 +0200
Message-ID: <MPG.1d13716512dae106989692_at_news.ntnu.no>


In article <1118331451.987578.29140_at_f14g2000cwb.googlegroups.com>, neo55592_at_hotmail.com says...
> Yes, I wanted to store a person with 0 to many phone#s.
> Would ID fields be needed in that case?

No. Sorry, but this shows you do not have a clear understanding of the RM (or that your writing is imprecise). If your problem domain includes several people with the same name, and you need to distinguish between them, you need to introduce an additional attribute, yes.

> > > What if "222-2222" appears in mulitple columns of multiple tables?
> > What about it? Please be more explicit.
> >
> What enforces the integrity between multiple 222-2222? What prevents
> data corruptions? What facilities management of the multiple
> 222-2222's?

What "integrity between multiple 222-2222s"? There is only one 222-2222. It is a value; it may be used all over the place, but it is still the same value. What kind of corruption are you afraid of? What management are you requesting? You are being very unclear.

> > > What enforces the integrity of the "222-2222"s?
> > What kind of integrity do you need?
> >
> The kind that minimizes data corruption and maximizes data management.

Please. You can't tell a computer "minimize data corruption and maximize data management". Give me rules. Be explicit. Be formal.

> > What enforces it in your xrdb?
> >
> The xrdb-engine. Each thing is represented once which may be referred
> to 0 to many times. For example, the person John is represent once with
> multiple references to him.

You call *that* integrity? That makes it hard to discuss it.

> It seems RDF's original function was to model meta-data about the
> resources of the web. RDF seems to be related to / embedded in XML.

Well yeah, XML is typically used to store it, probably because it is geared towards description of web resources. But RDF is really just semantic networks. Triplets of subject, predicate and object. You can put it in a SQL database.

> Below is an example I found in a tutorial. Could anyone show how to use
> RDF to store/query the data in above example?

I won't bother with XML syntax, but the triplets might look like this (Class, Property and type are "predefined" by the RDF standard):

Person		type		Class
phone		type		Property
john		type		Person
john		phone		111-1111
john		phone		222-2222
mary		type		Class
mary		phone		222-2222
bob		type		Person

RDF separates between Properties (which can be used as predicates, I.e. in the middle column) and other things; I am not sure if your model does.

It's flexible, you can make your own "schema", and the "schema" is part of the "database" (for better or for worse). But you have no integrity (there are inference rules, but they are undecidable in the general case), and it is of course a network: pointer chasing, graph theory and record-at-a-time processing.

-- 
Jon
Received on Mon Jun 13 2005 - 10:09:56 CEST

Original text of this message