Hi,
For some time I´ve been using surrogate keys for identifying all entities in my database. Although this sounds logical to me when applied to the main entities in my domain model, it does not seem to add much for weak entities, which will carry the key generated for their owning entities and will always be referenced through the main entity. These weak entities have 'component' collection semantics.
I am thinking about mapping these 'components' to a table without a surrogate key, making the foreign key and a sequence number, relative to this foreign key, the component PK. As this is also not best practice (using composity keys to identify the entity) I would like to know if anyone in the list could share their thoughts about this or any similar approachs.
TIA,
Tedi
|