Re: Relational vs. PICK/Object DBMS

From: x <x-false_at_yahoo.com>
Date: Mon, 26 Apr 2004 17:05:37 +0300
Message-ID: <408d1681$1_at_post.usenet.com>


  • Post for FREE via your newsreader at post.usenet.com ****

"Neo" <neo55592_at_hotmail.com> wrote in message news:4b45d3ad.0404250954.5bcf60f8_at_posting.google.com...
> > 1) Suppose you have a bunch of attributes that describes the entities
in
> > your database. Suppose any attribute is optional for any entity.
> >
> > a) For a given set of attributes
> > - find all the entities that for EVERY attribute in the given set
> > have at least one value.
> > - also find the values of the given attributes
> >
> > b) For a given entity
> > - find all the attributes that have at least one value for the given
entity
> > - also find the values of the attributes for the given entity
>
> Does the following data, queries and results demo your question?
>
> wig1's color is red.
> wig2's color is red, green AND texture is soft AND material is nylon.
> wig3's texture is soft AND material is jute.

> coat1's color is red.
> coat2's texture is soft AND material is cotton.
> coat3's color is green AND texture is smooth, supple.

color(wig1,red)
color(wig2,red)
color(wig2,green)
color(coat1,red)
color(coat3,green)

texture(wig2,soft)
texture(wig3,soft)
texture(coat2,soft)

texture(coat3,smooth)
texture(coat3,supple)
material(wig2,nylon)
material(wig3,jute)
material(coat2,cotton)


> Given the attribute set {color, texture}
> Query a1 returns: wig2 and coat3.
> Query a2 returns:
> wig2's color is red, green AND texture is soft.
> coat3's color is green AND texture is smooth, supple.

a)
 wig2's color is red, green AND texture is soft coat3's color is green AND texture is smooth, supple

 OR
({wig2}, {red,green},{soft})
({coat3},{green},{smooth,supple})

OR

(wig2,red,soft)
(wig2,green,soft)
(coat3,green,smooth)
(coat3,green,supple)

> Query b1)
> Given wig1, returns wig1's color is red.
> Given wig2, returns wig2's color is red, green AND texture is soft .
> Given wig3, returns wig3's texture is soft .

b)
Given wig1, returns wig1's color is red. Given wig2, returns wig2's color is red, green AND texture is soft AND material is nylon
Given wig3, returns wig3's texture is soft AND material is jute.

OR
Given wig1,returns (wig1,color:red)
Given wig2, returns (wig2,color:{red,green},texture:{soft}, material:{nylon})
Given wig2, returns (wig3,texture:{soft},material:{jute})

OR
Given wig1, returns color(wig1,red)

Given wig2, returns
color(wig2,red)
color(wig2,green)

texture(wig2,soft)
material(wig2,nylon)

Given wig3, returns
texture(wig3,soft)
material(wig3,jute)

OR any other equivalent schema for the same data But note that here we have only the attributes {color, texture , material}. What happens to the solution if the set of all attributes is large but the set
of attributes recorded for any entity vary from none to all ?

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

  • Usenet.com - The #1 Usenet Newsgroup Service on The Planet! *** http://www.usenet.com Unlimited Download - 19 Seperate Servers - 90,000 groups - Uncensored -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Received on Mon Apr 26 2004 - 16:05:37 CEST

Original text of this message