Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

In the following scenery in a ER and relational Model:

Object 1-----N [Part] 1-----N [Subpart] 1-----N [Item]
(Where "1-----N" is a 1 to N relationship; and [Entity] is weak).

Solution 1:
'"Object"' is a strong entity; and 'Part', 'Subpart' and 'Item' are weak entities:

Object (*IDObject,...)
Part (*IDObject, *IDPart,...)
Subpart (*IDObject, *IDPart, *IDSubpart,...) 
Item (*IDObject, *IDPart, *IDSubpart, *IDItem,...)
(Attributes marked with * make the composed key of the table)

In this particular case of "Items of Subparts of Parts of Objects", another way of designing and implementing the same problem could be:

Solution 2:

Object 1-----N Part 1-----N Subpart 1-----N Item (All entities are strong)

Table implementation:

Object (*AutoincrementID,...)
Part (*AutoincrementID,...)
Subpart (*AutoincrementID,...)
Item (*AutoincrementID,...)
(Each table having it's own ID: an unique autoincrement field)

My questions are:
I would like an academic response; I mean the theory about this practices.

  1. Which is the correct way of designing and implementing this scenario?
  2. Is the "Solution 2" a denormalized model/implementation? In which way?
share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.