Example: I've two tables during my database known as classA and classB, and something table known as classA_classB. The final one just defined two int fields with foreign secrets to outcomes of classA and classB. So one classA might have many classB, and several classA can link with similar classB. Simple stuff, to date.

The issue is, during my special situation, that I've got a classA which really wants to connect to another classA. I.e. students links to his buddies, who're Students too.

So analogue towards the technique above, I've: student and student_student. student_student has two fields: student_id, student_id. Problem: Can't have two fields with same title!

And So I must give them a call like: master_student_id, slave_student_id.

However I can't stand the terms "Master" and "Slave", since these are memory joggers to some bad amount of time in our pasts. It might seem silly however i think it isn't correct to help keep these, a minimum of from the moral perspective. I understand it is simply part of modern computer science,... but....

how else could I give them a call?

parent and child maybe? Also i am unsure if there's really one entity "the mainInch as the other is "the worker"... Student and Student aren't hierarchical. However, again, allows imagine we'd two classes "Teacher" and "Student". That might be a obvious hierarchy. However, I want a neutral solution because my framework threads these 1:n associations allways exactly the same way.

Parent and Child or Owner and Child may be the generally recognized solutions.

What about student_id and friend_id? There is no rule that states your foreign secrets must have exactly the same column names because the primary key.

Do you know the roles of these two students within the relationship? Buddies? Mentors? Acquaintances? You will find plenty of possible roles they fill.

You are able to brainstorm lots of roles which have asymmetric names.

friend, friend_of

mentor, mentored_by

referrer, known_by

related_id or connected_student_id could be my preference.

Is dependent on set up relationship (allows refer to it as R) is symmetric. If that's the case then person1, person2 is okay since R(person1, person2) = R(person2, person1). If they're not symmetric then your names should most likely reflect an "agent and patient" relationship. So make use of a word to denote the agent and something to denote the individual, e.g. Befriender, Friend.

rather than

the standard nowadays appears to become

begin to see the following references:




[04] www05.abb.com/global/scot/scot201.nsf/veritydisplay/a11e30d538ab1b49c2256def00493279/$file/en_800stdprg_mfguide_a.pdf

[05] www.danfoss.com/BusinessAreas/DrivesSolutions/MUSEC/

[06] forums.ni.com/t5/Motion-Control-and-Motor-Drives/Transforming-a-master-follower-type-Cam-Grinding-Machine-to-CNC/td-p/1469070

[07] www.burhansresearch.com/mrcwfdbk1.htm

[08] www.eurekamagazine.co.united kingdom/article/28893/Master-follower-communication-in-ABB-industrial-drives.aspx

[09] www.lockmasters.com/index.asp?PageAction=VIEWPROD&ProdID=49879

[10] www.perfusion.com/cgi-bin/forum/forum_posts.asp?TID=500

this will work better - you don't need to use a morally reprehensible term for any hierachical computer/technological controls arrangement... for instance, we'd designate fittings as "male" and "female", not "male" and "whore".... both cases "result in the point" inside a somewhat descriptive sense, however it is advisable to result in the point using non morally reprehensible or inflammatory terms

excellent question, btw!