From: "x" <x-false@yahoo.com>
Newsgroups: comp.databases.theory
References: <40854c6a$1@post.usenet.com> <26f6cd63.0404202228.3244c15c@posting.google.com> <40862c96@post.usenet.com> <4b45d3ad.0404250954.5bcf60f8@posting.google.com>
Subject: Re: Relational vs. PICK/Object DBMS
Date: Mon, 26 Apr 2004 17:05:37 +0300
Lines: 102
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 81.196.98.200
X-Original-NNTP-Posting-Host: 81.196.98.200
Message-ID: <408d1681$1@post.usenet.com>
X-Trace: post.usenet.com 1082988161 81.196.98.200 (26 Apr 2004 09:02:41 -0500)
Organization: Usenet.com http://www.usenet.com 100,000+ UNCENSORED Newsgroups. The #1 Usenet Service on the Planet!
X-Comments: This message was posted through Usenet.com's, FREE  publicly accessible Usenet Server   -  "post.usenet.com"
X-Comments2: IMPORTANT: Usenet.com does not condone, nor support,  spam or any illegal or copyrighted postings.
X-Comments3: IMPORTANT: Under NO circumstances will postings containing illegal or copyrighted material through this service be tolerated!!
X-Report: Please report illegal or inappropriate use to <abuse@usenet.com>
X-Abuse-Info: Please be sure to forward a copy of ALL headers, INCLUDING the body (DO NOT SEND ATTACHMENTS)
Path: newssvr20.news.prodigy.com!newsmst01a.news.prodigy.com!prodigy.com!news.glorb.com!news-out2.spamkiller.net!post.usenet.com!not-for-mail
Xref: newssvr20.news.prodigy.com comp.databases.theory:25968

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


"Neo" <neo55592@hotmail.com> wrote in message
news:4b45d3ad.0404250954.5bcf60f8@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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
