Fluffy
09-22-2003, 11:46 PM
Hey,
I have a table 'Hubs' with key 'Hubid'... Since a hub can be connected to another hub in a network, I have a reflexive relationship...
How do I do this in Access?
Any help would be appreciated!
Mile-O
09-23-2003, 01:26 AM
Add a second instance of the Hub table in the relationships window and relate the ID field.
Fluffy
09-23-2003, 03:23 AM
Okay, thanks...
But, since one hub can be connected to more than one hub, I have an n to n relation...
So, I have to add an extra instance in the relationships window and also create a new table to get rid of the n to n relation, am I right?
Fluffy
09-23-2003, 03:45 AM
And what about the second instance in relation to other tables...
Do I relate the table 'PC's to both or only one of the 2 instances? I guess only one, but am not sure...
Mile-O
09-23-2003, 03:54 AM
Create a junction table and link realte the two instances of the Hub table:
tblHub
HubID
Other Info
tblHub_1
HubID
Other Info
tblHubToHub
HubID (FK from tblHub)
HubID (FK from tblHub_1)
namliam
09-23-2003, 04:01 AM
Just wanted to add 1 small note to make sure...
there will only be 1 table tblHub! But 2 instances in your query/relationship window.
Regards
Pat Hartman
09-23-2003, 11:30 AM
reflexive - don't you mean recursive?
Fluffy
09-23-2003, 11:38 AM
Both are used on the net (I tried both on google)
I don't know which one is correct though...
Pat Hartman
09-24-2003, 12:00 PM
According to my unabridged dictionary, recursive is a mathmatical term and reflexive is a gramatical term. Within that context they seem to embody a similar concept. I believe that recursive has been used longer to define a self reference since that is the term in use in the late 60's when I entered the field and your use of reflexive was new to me.