From: Willem Fischer on
Hi,

don't know how to call this... It's not circular references, rather
references where you have multiple paths between two tables, like
this:

A->C
A->B
B->D
C->D

or

A->B
B->C
A->C

etc.

1. How do you call this?
2. Is it bad design by default?
3. Is it bad design if your database is full of this kind of reference
paths?

Also, if you have a link to a document that talks about this and other
database design patterns, I'd love to hear.
From: Lennart Jonsson on
On 2010-04-22 13:20, Willem Fischer wrote:
> Hi,
>
> don't know how to call this... It's not circular references, rather
> references where you have multiple paths between two tables, like
> this:
>
> A->C
> A->B
> B->D
> C->D
>
> or
>
> A->B
> B->C
> A->C
>
> etc.
>
> 1. How do you call this?

Adjancy list is one commonly used term

> 2. Is it bad design by default?

No, not necessarly. It all depends on the requirements. Given the tuples
(A,B), (B,C) the tuple (A,C) may or may not be redundant. Say for
example that we are representing the relation PARENT. A is a parent of B
and B is a parent of C does not imply that A is a parent of C. In those
(hopefully rare :-) cases where A is a parent of both B and C, this has
to be recorded as a separate tuple, i.e. (A,C).

> 3. Is it bad design if your database is full of this kind of reference
> paths?
>
> Also, if you have a link to a document that talks about this and other
> database design patterns, I'd love to hear.

Not sure if it is what you are looking for, but you can check out:

http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.53

Troels Arvin has a nice list of articles etc. regarding hierarchical data:

http://troels.arvin.dk/db/rdbms/links/


/Lennart
From: Willem Fischer on
On Apr 22, 1:49 pm, Lennart Jonsson <erik.lennart.jons...(a)gmail.com>
wrote:
> On 2010-04-22 13:20, Willem Fischer wrote:
>
>
>
> > Hi,
>
> > don't know how to call this... It's not circular references, rather
> > references where you have multiple paths between two tables, like
> > this:
>
> > A->C
> > A->B
> > B->D
> > C->D
>
> > or
>
> > A->B
> > B->C
> > A->C
>
> > etc.
>
> > 1. How do you call this?
>
> Adjancy list is one commonly used term
>
> > 2. Is it bad design by default?
>
> No, not necessarly. It all depends on the requirements. Given the tuples
> (A,B), (B,C) the tuple (A,C) may or may not be redundant. Say for
> example that we are representing the relation PARENT. A is a parent of B
> and B is a parent of C does not imply that A is a parent of C. In those
> (hopefully rare :-) cases where A is a parent of both B and C, this has
> to be recorded as a separate tuple, i.e. (A,C).
>
> > 3. Is it bad design if your database is full of this kind of reference
> > paths?
>
> > Also, if you have a link to a document that talks about this and other
> > database design patterns, I'd love to hear.
>
> Not sure if it is what you are looking for, but you can check out:
>
> http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.53
>
> Troels Arvin has a nice list of articles etc. regarding hierarchical data:
>
> http://troels.arvin.dk/db/rdbms/links/
>
> /Lennart

What I actually meant was references between several tables, not a
recursive reference on one table.

Any "Best Practice" about that?