Обсуждение: 8.2 contrib. "Full Disjunction"

Поиск
Список
Период
Сортировка

8.2 contrib. "Full Disjunction"

От
Richard Broersma Jr
Дата:
I see that a new contrib module was added with the release of 8.2:
http://pgfoundry.org/projects/fulldisjunction/

I found this article that describes the set theory behind it:
http://dbpubs.stanford.edu:8090/pub/showDoc.Fulltext?lang=en&doc=1996-58&format=pdf&compression=&name=1996-58.pdf

Most of it is over my head since I do not have a deep knowledge of set theory as well as all of
the weird squiggly symbols that are used in this paper.

Understanding the concepts of inner, outer, full outer, and cross joins are straight forward to me
as to their application and use.  However, since full disjunction is apparently some kind of join:

1) what is its application?
2) how is it used?

Regards,

Richard Broersma Jr.

Re: 8.2 contrib. "Full Disjunction"

От
Richard Broersma Jr
Дата:
> 1) what is its application?
I guess I found part of my "laymans" answer:
http://www.cs.toronto.edu/~yaron/Presentations/pods2003.ppt#468,39,Example

> 2) how is it used?
Maybe this question should have been, what is the syntax?

Regards,

Richard Broersma Jr.

Re: 8.2 contrib. "Full Disjunction"

От
"Brandon Aiken"
Дата:
Download the contrib module .tgz from PGFoundry and check out the
readme.  Syntax is explained therein.  It's a multi-step process, it
appears.

I don't especially care for the term 'full disjunction' to describe this
operation, but it seems to be an understood relational operation.

--
Brandon Aiken
CS/IT Systems Engineer
-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Richard
Broersma Jr
Sent: Wednesday, December 06, 2006 1:30 AM
To: Richard Broersma Jr; General PostgreSQL List
Subject: Re: [GENERAL] 8.2 contrib. "Full Disjunction"

> 1) what is its application?
I guess I found part of my "laymans" answer:
http://www.cs.toronto.edu/~yaron/Presentations/pods2003.ppt#468,39,Examp
le

> 2) how is it used?
Maybe this question should have been, what is the syntax?

Regards,

Richard Broersma Jr.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@postgresql.org so that your
       message can get through to the mailing list cleanly

Re: 8.2 contrib. "Full Disjunction"

От
Tzahi Fadida
Дата:
Hi,
Let me simplify it in lamer terms.
Basically, you have a cycle in your relations schema. i.e.
rel A: att-x, att-y
rel B: att-y, att-z
rel C: att-z, att-x

The only way to join these three without loosing a lot of information (aside
from some very weird corner cases which i won't mention here), is to use my
full disjunctions which is probably most certainly the only implementation of
the operation in existence to calculate the general case (which you can see
above).
Btw, it also applies to more than 3 relations, but be careful, it can be a
costly operation. I would try it on very small relations and gradually move
up to see how it performs.

You can see examples in the contrib module dist in pgfoundry.

On Wednesday 06 December 2006 17:37:58 Brandon Aiken wrote:
> Download the contrib module .tgz from PGFoundry and check out the
> readme.  Syntax is explained therein.  It's a multi-step process, it
> appears.
>
> I don't especially care for the term 'full disjunction' to describe this
> operation, but it seems to be an understood relational operation.
>
> --
> Brandon Aiken
> CS/IT Systems Engineer
> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Richard
> Broersma Jr
> Sent: Wednesday, December 06, 2006 1:30 AM
> To: Richard Broersma Jr; General PostgreSQL List
> Subject: Re: [GENERAL] 8.2 contrib. "Full Disjunction"
>
> > 1) what is its application?
>
> I guess I found part of my "laymans" answer:
> http://www.cs.toronto.edu/~yaron/Presentations/pods2003.ppt#468,39,Examp
> le
>
> > 2) how is it used?
>
> Maybe this question should have been, what is the syntax?
>
> Regards,
>
> Richard Broersma Jr.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster



--
Regards,
        Tzahi.
--
Tzahi Fadida
Blog: http://tzahi.blogsite.org | Home Site: http://tzahi.webhop.info
WARNING TO SPAMMERS:  see at
http://members.lycos.co.uk/my2nis/spamwarning.html

Re: 8.2 contrib. "Full Disjunction"

От
Martijn van Oosterhout
Дата:
On Fri, Jun 22, 2007 at 07:38:01PM +0300, Tzahi Fadida wrote:
> Let me simplify it in lamer terms.
> Basically, you have a cycle in your relations schema. i.e.
> rel A: att-x, att-y
> rel B: att-y, att-z
> rel C: att-z, att-x
>
> The only way to join these three without loosing a lot of information (aside
> from some very weird corner cases which i won't mention here), is to use my
> full disjunctions which is probably most certainly the only implementation of
> the operation in existence to calculate the general case (which you can see
> above).

FWIW, with this simple description I finally worked out what full
disjunctions are and why you can't do them (efficiently) in SQL.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

Re: 8.2 contrib. "Full Disjunction"

От
Gregory Stark
Дата:
"Martijn van Oosterhout" <kleptog@svana.org> writes:

> On Fri, Jun 22, 2007 at 07:38:01PM +0300, Tzahi Fadida wrote:
>> Let me simplify it in lamer terms.
>> Basically, you have a cycle in your relations schema. i.e.
>> rel A: att-x, att-y
>> rel B: att-y, att-z
>> rel C: att-z, att-x
>>
>> The only way to join these three without loosing a lot of information (aside
>> from some very weird corner cases which i won't mention here), is to use my
>> full disjunctions which is probably most certainly the only implementation of
>> the operation in existence to calculate the general case (which you can see
>> above).
>
> FWIW, with this simple description I finally worked out what full
> disjunctions are and why you can't do them (efficiently) in SQL.

I'm still lost. I can see how it would be hard to join these together but I'm
not sure what result I would be after.


--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com


Re: 8.2 contrib. "Full Disjunction"

От
Martijn van Oosterhout
Дата:
On Sat, Jun 23, 2007 at 10:33:49PM +0100, Gregory Stark wrote:
> "Martijn van Oosterhout" <kleptog@svana.org> writes:
> > On Fri, Jun 22, 2007 at 07:38:01PM +0300, Tzahi Fadida wrote:
> >> Let me simplify it in lamer terms.
> >> Basically, you have a cycle in your relations schema. i.e.
> >> rel A: att-x, att-y
> >> rel B: att-y, att-z
> >> rel C: att-z, att-x
>
> I'm still lost. I can see how it would be hard to join these together but I'm
> not sure what result I would be after.

Well, the way I understand it is if you had the following data:

rel A
x : y
1 : 2
5 : 6

rel B:
y : z
2 : 3
7 : 8

rel C:
z : x
3 : 1
10 : 9

That the result would be:

x : y : z
1 : 2 : 3
5 : 6 :
  : 7 : 8
9 :   : 10

Now, I can't off the top of my head think of a schema where you would
need this, but if you have this problem then I don't see the solution
in plain SQL.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения