Switch to: V12V11V10V9V8V7V6V5

Pointer Links

In this section we want to point that Foreign Key and ObjectPtr Links have clear nature of pointers. Really, look at the following picture:


Let we want to link Person and Phone Tables as One to Many. To do this with Foreign Key, we add additional column into MANY table. Linked records of MANY table will keep in this field the ID of parent record.

It is easy to see that this works like a pointer! If you are at some Phone record, you extract its Person ID and go to the Person table to find this person.

Taking this into account, we recommend to use for name of FK field the template: “TableName_ptr”. On above picture you can see “Person_ptr”.

Note, that practically all other DBMS use for this fields template “TableName_ID”, but again, we think that much better underline POINTER nature of these fields.

Becides you can see how perfect this “pointer nature” of FK and ObjectPtr links is expressed with use of Operator ->.