Sometimes more than one attribute needs to create a key that uniquely represents a tuple. That keys are known as a composite key or compound key.
Any>super key,>primary key,>candidate key>can be called a composite key if it has more than one attribute.
Lets consider a table Sales with four attributes or columns – customer_id, order_id, pcode and qty.
Here, none of these columns can declare as a primary key that uniquely identifies a tuple. Because
Here only the combination of customer_id and order_id can uniquely identify a tuple and can be declared as the primary key. That is why the said set of keys known as a composite key.