General question regarding info in the help file

Posts   
 
    
vba-dev
User
Posts: 4
Joined: 30-Oct-2007
# Posted on: 14-Nov-2007 01:47:30   

Hello, I'm studying LLBLGen Pro to learn how to use it. I thought it important to first understand the concepts used, so I am studying the help file.

A "Note" in the file has caught my attention. It reads:

Don't use surrogate keys on the subtype tables, it's important the PK of the subtype tables has the foreign key to the supertype's PK.

Am I to understand this to mean that if I had, for example, the following two tables,

Customer CustomerAddress

...that the PK of the CustomerAddress table should be related directly to the PK of the Customer table?

If so, how will LLBLGen Pro handle relationships built the way I learned: the PK of the CustomerAddress table is unique, and unrelated to the Customer table. The Customer table PK is represented in the CustomerAddress table, but it is not the PK of the CustomerAddress table.

Thank you.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 14-Nov-2007 10:40:27   

Don't use surrogate keys on the subtype tables, it's important the PK of the subtype tables has the foreign key to the supertype's PK

The above note is speaking about Inherited Entities i.e. entities with inheritance relations, not those with refrential relations.

eg. Customer & VIPCustomer simple_smile Or Employee & BoardMember

Where you want to have a table to extend another table.