What is foreign key ? Short note on foreign key.
Foreign Key :-
Foreign Keys represent relationship between tables. A foreign Key is a column or a group of column whose values are derived from the primary key or unique key of some other table. The table in which foreign is defined a foreign table or detail table. The table that defines the primary or unique key and is referenced by the foreign key is called the primary table or master table.
For example consider two relations STUDENT ( REGN – NO, NAME, COURSE, STATUS ) and BATCH (Roll-No, REGN-No). Also we consider REGN-No in STUDENT relation is a primary key and it is referenced to the attribute REGN-NO in BATCH relation. Thus REGN-No is a foreign key with respect to the relation STUDENT.
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment