use of composite key is that:-
If you define primary key on two columns then columns can not take duplicate records.
composite key treat both of those columns as primary key.
eg. you have link table and that table has mstrid and transid columns. you have assign
primary key(mstrid ,transid) then they both columns can accept unique values.
mstrid transid
1 1001
2 1002
it allowed but you going to insert same record again in link table with same mstrid and transid then it is not allowed.
mstrid transid
1 1001
For more details read below links:-
http://weblogs.sqlteam.com/jeffs/archive/2007/08/23/composite_primary_keys.aspx[
^]
http://www.techopedia.com/definition/6572/composite-key[
^]