Search code examples
databasediagram

Database disjoint relation


If I have a diagram like this

ScreenShot1

Does it mean that these 3 entities are the only possibilities I have? I mean if answering a question: are all wines must be red, rose or white... I cant assume that there is might exist one more entity (meaning there are more partitions)

One more question. If I have entity with two attributes underlined attributes

Screenshotexample

In such diagram, it means two attributes together are composed PK or I can choose any of them to be a PK or both(I believe in this type of diagram it is possible, right?). Thank you.


Solution

  • you need to choose composite PK one from parent another from child