Quoting Wikipedia, a weak entity "must use a foreign key in conjunction with its attributes to create a primary key." , and "is existence-dependent on another entity". But can't an entity be existence-dependent on another entity without having (part of) the PK the FK ?
In the classical Order - OrderLine - Product relation, OrderLine is a weak entity because its PK consists of the two FK's from the others entities, say orderID and productID.
But what about the Order entity ? Let's say it looks like this:
Order( orderID - not null, Primary key,
costumerID - not null, Foreign key,
date,
status,
...)
It's clear enough that an order can't exist without a costumer(costumerID), but at the same time, costumerID is not part of the Primary key.
- So, in this case, is the Order entity a weak one, or not ?
- What if we had omitted the NOT NULL constraint of the FK customerID ? Order wouldn't be a weak entity anymore, right ?