Link to home
Start Free TrialLog in
Avatar of hongjun
hongjunFlag for Singapore

asked on

weak entity and its primary key

Hi,

   I know that for weak entity, we have to include the primary keys of the strong attribute as one of the weak entity's attribute. I would like to know if it is possible that the primary keys of the weak entity does not include the primary key of the strong entity which it is related to? Lets say in one question, the answer given was

https://www.experts-exchange.com/questions/10102690/Weak-and-Strong-Entities.html?query=weak+entity&clearTAFilter=true

Strong entity...
Table Orders
ID        int      Primary Key
OrderNum  varchar
OrderDate datetime

Table Items
ID        int      Primary Key
Desc      varchar

weak....
Table OrderDetail
OrderID   int      Foreign Key (references Order.ID)
ItemID    int      Foreign Key (references Item.ID)
Qty       int

So if I give a unique number lets say OrderDetail_id as the primary key, do I still need the OrderID and ItemID as one of the primary keys in the weak entity?
ASKER CERTIFIED SOLUTION
Avatar of Arthur_Wood
Arthur_Wood
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hongjun

ASKER

Hey.. Arthur_Wood,

Thanks for your input. It was accidentally posted by a friend using my account without me logging off first.
As such, this question is closed now.

Cheers
hongjun