Page tags

Add a new page

This is the part-of relationship. Consider again the relationship among car, body, and engine.

This looks like the subtype relationship but it is interpreted differently. Attributes are not “inherited” by the subparts like they are by the subtypes. Suppose we had the following information to store:

car

id, name

body

id, name

engine

id, name

Without the subtype relationship we would create the following relations:

car(__id__, name)
body(__id__, name)
engine(__id__, name)

However, this does not reflect that a certain body and a certain engine are subparts of a certain car. To add these facts, we need to add the ids of the subparts to the car relation: