Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 10th, 2005, 08:08 AM
Maldor's Avatar
Maldor Maldor is offline
Muhhnnn !!
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2003
Posts: 1,530 Maldor User rank is Second Lieutenant (5000 - 10000 Reputation Level)Maldor User rank is Second Lieutenant (5000 - 10000 Reputation Level)Maldor User rank is Second Lieutenant (5000 - 10000 Reputation Level)Maldor User rank is Second Lieutenant (5000 - 10000 Reputation Level)Maldor User rank is Second Lieutenant (5000 - 10000 Reputation Level)Maldor User rank is Second Lieutenant (5000 - 10000 Reputation Level)Maldor User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 7 h 38 m 2 sec
Reputation Power: 83
Reflexive Relation.

Hi, I would like advice on how to most efficiently design a reflexive relation.

I have 2 use cases for that:

1) table A have a 1-n relation with itself. For example I want to modelise A1 as an row and to notify that A1 is compatible with A2 / A3 and A4. But this also implies that A2 is compatible with A1 (but it doesn't imply that A2 and A" are compatible). So the relation A1-A2 is identical to the relation A2-A1. The main query used on this would be to answer the 2 questions "What is An compatible with? " "Is An compatible with Am ?". I would like to avoid having to play my queries both way and checking if the *reversed* relation exists as well in the database before inserting it...

2) table Segment define a connection between two points. A segment is not oriented and is defined by 2 extremities. In the following example, Segment 1 and Segment 2 are somehow identical and violating the uniqness...

Segment 1
----------
Extremity_1 = A
Extremity_2 = B

Segment 2
----------
Extremity_1 = B
Extremity_2 = A

I would like to implement this the best way to abstract this complexity from all queries.

Thanks for your help =)
__________________
"The ultimate knowledge is reached when it does not bring new questions..."
-- Usaphdas encyclopedia XV.4


Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Reflexive Relation.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway