V4RB: Naming Convention for ObjectPtr-Link
    Ruslan Zasukhin 
    ruslan_zasukhin at valentina-db.com
       
    Wed Apr  7 06:19:13 CDT 2010
    
    
  
On 4/7/10 10:10 AM, "Claudius Sailer" <claudius.sailer at me.com> wrote:
>>>>> for linking tbl_person and tbl_phones:
>>>>> 
>>>>> lnk_person_has_phone or lnk_phone_of_person
>>>>> 
>>>>> Actually we did not use the lnk_ part, but in retrospect it would have
>>>>> been
>>>>> better (easier to filter out what you need when working in the sql-editor)
>>>> 
>>>> Yes, this is the most common method to give names for links.
>>>> Can be even automated :)
>>> 
>>> 
>>> I do it now this way.
>>> 
>>> tablename_fieldname__referencetablename
>> 
>> Well, let me even more clarify.
>> 
>> Bart above have give name with some human sense.
>> 
>> Really automatd names are:
>> 
>>    link_T1_T2
>> 
>> I.e. We just show names of tables...
>> 
>> In theory between the same tables T1 and T2 can be few different  links.
>> Then name can be
>> 
>>    link_T1_T2_N
>> 
>> Or add some sense word
>> 
>> 
>> In your above example, for me not clear why to add field name...
>> Link is something between tables... Link should not be related to fields.
> 
> I don't understand this. The link is not between tables. It is ObjectPtr
> between one filed in one table to an other table.
No no no
ObjectPtr is a FIELD, yes, but its SENSE is to be a LINK between T1 and T2.
Right?
Except ObjectPtr exists yet ForeignKey-Link, and Binary link.
May be you need carefully read in Valentina WIKI
<http://valentina-db.com/dokuwiki/doku.php?id=valentina:vcomponents:vkernel:
vlink:vlink>
And in ARTICLE section was some introduction article
> In a table I can have a lot
> of fields as ObjectPtr with connections to a lot of other tables.
Right, this means you have links
    link_T1_T2
    link_T1_T3
    link_T1_T4
> With the 
> name I am using I can see which filed is linked via ObjectPtr in which table
> to what other table.
Well, this is of course up to you...
If you fell more comfort in such way
> When I use only table1 and table2 I only know that this tables are linked but
> I have to look into the table definition to see the complete information.
Yes..
 
Then I will recommend names:
    link_T1_T2_fld
I.e. Field name is ADDITIONAL info, which you want to have in your project.
> Bye the way Barts hint was great and I see the "human sense" but I missed some
> information to I expand the hint of Bart ;-))
-- 
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
    
    
More information about the Valentina
mailing list