Bob_Hansen wrote on Nov 11
th, 2006 at 7:31pm:
How can they be tied using BOTH Natural AND Relational?
Is that really possible?
You can have one parent natural link any record definition ("database") and as many as you want link relationally. It is possible because the natural link cause the parent to point to the first child, then each child points to the next child:
Parent's child ID: 12
12: Child 1 --> Next: 17
17: Child 2 --> Next: 32
32: Child 3 --> Next: 91
91: Child 4 --> Next: NULL
The example above shows a parent with four children. The last child's "next pointer" points at NULL, and ends the list.
With relational linking, the parent does not "point" at any children, it simply gathers those children that share the correct value in the key field by running through the list of all records that match the record type for its child. Because a relational parent does not concern itself with a child pointer, nor do relational children affect their "next pointers", both relational and natural linking can take place on forms at the same time.
But, it is a rarely needed capability that adds greatly to design complexity. Using this to check whether child records are in place, is likely to cause many more problems than it solves, especially in a highly automated application.
Quote:I include the fields to "relate" parent and children records, but stay with Natural linking structure for the speed. I stopped using Relational structures once I was aware of the speed differences.
That is a better idea for checking whether child records are landing where intended. It allows the user to reattach orphaned records easily. We have seen very little unintended orphaning lately. It seems to be reserved to a handful of users that are either running applications that were created before Sesame 1.0 (during Beta), or those that have been unlocked while running - or both.