السلام علیکم و رحمتہ اللہ
Sister
Primary keys un attributes ya columns ko kehty hn jo k ksi bhi table k andr se distinct record select krny k liye use hoty hn..
Like in Product table, P_ID is a good candidate of being Primary Key because through P_ID go to a specific single record.
Foreign is a type of attribute through which we can select a single or multiple records relating to the same primary key existing in another table.
Example:
Suppose there are two tables Customer and Order
Customer:
Cus_ID PK
CName
Address
Order:
O_ID PK
Description
Amount
Cus_ID FK
Here in table named Order, there is an attribute named Cus_ID. This attribute will help us to select one or more records which are made by a specific Customer.
Hope it would be helpful :)
والسلام
--
Join us at facebook: https://www.facebook.com/VU.Study.Corner
Group Link: http://groups.google.com/group/VU-Study-Corner?hl=en
Group Rules: http://groups.google.com/group/VU-Study-Corner/web/group-rules
Unsubscribe: VU-Study-Corner+unsubscribe@googlegroups.com
Adult contents, Spamming, Immoral & Rudish talk, Cell number, Websites & Groups links specially in paper days are strictly prohibited and banned in group.
No comments:
Post a Comment