Re: LIST3 linked from LIST1 [message #4835 is a reply to message #4813] |
Sat, 11 July 2015 18:19 |
rafs
Messages: 69 Registered: May 2015
|
Member |
|
|
I originally skipped over your articles on database stuff. I have read them now. I guess I am rated as a novice with borderline nincompoop tendencies.
Anyways, I didn't see anything explicitly about the following (hypothetical) situation. A parent has many children, but always has a favorite (favourite) child. Are there any special considerations to be aware of? I would assume that I can just define each of these FK relationship in the data dictionaries, but I wonder if I will have to add some code since parent.child_id_favorite and child.child_id have different names.
parent
------
parent_id int primary key,
parent_name char(10),
child_id_favorite int,
FOREIGN KEY (child_id_favorite) REFERENCES child(child_id)
child
-----
child_id int primary key,
parent_id int,
child_name char(10),
FOREIGN KEY (parent_id) REFERENCES parent(parent_id)
Thanks.
[Updated on: Sat, 11 July 2015 18:22] Report message to a moderator
|
|
|