Analyzer

M

marta

Hi,
I have just run the Performance Analyzer in my database
and their suggestion read as follows:
Table 'Swap': Relate to table 'Swap'

Is it proper in a database to relate a table to itself? If
not, does this point to some errors in the way that I have
built my queries and/or relationships?
Thanks for your help,
marta
 
T

TC

You would not normally relate a table to itself.

What is the primary key of the table?

What other tables is it related to, & what are the primary keys of *those*
tables?

TC
 
J

John Vinson

You would not normally relate a table to itself.

What is the primary key of the table?

What other tables is it related to, & what are the primary keys of *those*
tables?
...

It can be, if that's logically relevant. I don't know what you're
"swapping", but I can imagine that you might be arranging a swap
between two records of the table; each record in the table would have
a logical relationship to some other record (or records) in the same
table.

One common self-join relationship occurs in heirarchies - a Personnel
table might have a SupervisorID field which is a link to another
person in the same Personnel table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top