Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: circular relationships ok?

Re: circular relationships ok?

From: Alexandr Savinov <spam_at_conceptoriented.com>
Date: Thu, 02 Mar 2006 09:21:45 +0100
Message-ID: <4406ab1a$1@news.fhg.de>


Volker Hetzer schrieb:
> Hi!
> Just in general, are circular relationships something that
> can always be avoided?
> Or, given a model with a circular relationship, possibly
> spanning several tables, is there a way to get rid of them?

One approach consists in using the concept-oriented data model as follows.

  1. Order your tables so that if table A references records from table B, then A is positioned under B. For example, if an order has a field with its customer then you position them as follows:

Customre

   |
Order

2. After that any relationship you define in this acyclic graph of tables will use only subtables. In other words, if table A has a relationship with table B then there is a common subtable C which is used to establish it (there can be more subtables for complex relationships). For example, a relationship between a customer and its products can be implemented via common Order table:

Customer Product

     \     /
      Order

This model avoids the problem of cycles in a principled manner. It provides also many other advantages and conveniences. Instead of modeling relationships via an arbitrary graph we use a concrete structure of ordered tables for that. Querying, grouping/aggregation, inference are also made easier in such an approach.

http://conceptoriented.com Received on Thu Mar 02 2006 - 02:21:45 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US