473,512 Members | 15,363 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Recursive Relationship in 97

MDS
All,

I would like to implement a recursive relationship in a table with
referential integrity enforced and cascade update turned on.

For example, a horse has a sire and dam. Both the sire and the dam
must be horses and, therefore, drawn from the same domain.

Is it possible to implement this recursive relationship in Access 97
having "Sire" and "Dam" attributes in the "Horse" table?
----
MDS
Nov 13 '05 #1
3 4672
Yes, it's possible.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"MDS" <md*********@yahoo.co.uk> wrote in message
news:42**********@news.bluewin.ch...
All,

I would like to implement a recursive relationship in a table with
referential integrity enforced and cascade update turned on.

For example, a horse has a sire and dam. Both the sire and the dam
must be horses and, therefore, drawn from the same domain.

Is it possible to implement this recursive relationship in Access 97
having "Sire" and "Dam" attributes in the "Horse" table?
----
MDS

Nov 13 '05 #2
The self-join is fine. The cascading update would probably be okay unless
you had a circular relationship, e.g. a horse that was incorrectly entered
as its own sire/grandsire/...

See:
Self Joins: tables that look themselves up (Pedigrees example)
at:
http://allenbrowne.com.au/ser-06.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"MDS" <md*********@yahoo.co.uk> wrote in message
news:42**********@news.bluewin.ch...
All,

I would like to implement a recursive relationship in a table with
referential integrity enforced and cascade update turned on.

For example, a horse has a sire and dam. Both the sire and the dam
must be horses and, therefore, drawn from the same domain.

Is it possible to implement this recursive relationship in Access 97
having "Sire" and "Dam" attributes in the "Horse" table?
----
MDS

Nov 13 '05 #3
MDS
Thanks for the feedback - that's exactly what I was after.

"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:42***********************@per-qv1-newsreader-01.iinet.net.au...
The self-join is fine. The cascading update would probably be okay
unless
you had a circular relationship, e.g. a horse that was incorrectly
entered
as its own sire/grandsire/...

See:
Self Joins: tables that look themselves up (Pedigrees example)
at:
http://allenbrowne.com.au/ser-06.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"MDS" <md*********@yahoo.co.uk> wrote in message
news:42**********@news.bluewin.ch...
All,

I would like to implement a recursive relationship in a table with
referential integrity enforced and cascade update turned on.

For example, a horse has a sire and dam. Both the sire and the dam
must be horses and, therefore, drawn from the same domain.

Is it possible to implement this recursive relationship in Access 97
having "Sire" and "Dam" attributes in the "Horse" table?
----
MDS


Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2221
by: Alex Polite | last post by:
I need to put recursive data structures on disc and found out that cPickle doesn't like recursion. What are my options? alex -- Alex Polite http://polite.se
2
1250
by: kosaraju.puneeth | last post by:
hello, I need to represent recursive relationship in xml which will be validated by defined xml schema. example: check.xml <a> <testgroup name="first" result ="pass"> <testgroup...
64
7220
by: dmattis | last post by:
I am trying to write a recursive version of Power(x,n) that works by breaking n down into halves(where half of n=n/2), squaring Power(x,n/2), and multiplying by x again if n was odd, and to find a...
2
5952
by: RJN | last post by:
Hi I need help in writing a recursive function. My table structure is as below. InstanceId LevelId ParentId 100 1 null 101 2 ...
5
11206
by: Joe Stump | last post by:
I have a table that will have a parent/child relationship (specifically a recursive collection of categories) and was wondering if I can reference a key in the same table ... CREATE TABLE...
3
6042
by: Robert Ludig | last post by:
I am fairly new to SQL and I am currently trying to create a SQL table (using Microsoft SQL) that has a recursive relationship, let me try to explain: I have a piece of Data let's call it "Item"...
14
3451
by: Fabian Steiner | last post by:
Hello! I have got a Python "Device" Object which has got a attribute (list) called children which my contain several other "Device" objects. I implemented it this way in order to achieve a kind...
2
1440
by: hardieca | last post by:
Hi, I'm building a CMS and I'm banging my head against the wall over one part of the user interface. I have a Section entity which maybe have 0 or 1 parent Sections. So, as an example, I...
8
8290
by: Pivot_Tables | last post by:
Hi, I have created a recursive SQL Query in DB2 and it works fine until some point in the tree where the data gets into infinite loop. Below are some sample data from my relationship table. ...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7371
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5676
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1583
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.