Foreign key Assignment Help

Assignment Help: >> Keys - Foreign key

Foreign key

When a primary key of one table appears as an attribute in another table it is known as the foreign key in the second table. A foreign key is used to associate two tables.

Let consider the tables, staff and department.

Department

                          1441_Foreign key.png

Staff

                    1742_Foreign key 1.png

Because deptcode is unique in the department table, you can choose deptcode as a primary key. While it apperas in the staff table as an attribute it will be the foreign key in the staff table. You must ensure in which the values of the foreign key match with any one value of the primary key.

You can use the subsequent conventions to represent the keys in the table structure by.

Foreign key –Fk

Primary key– Pk

                          772_Foreign key 2.png

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd