# Miscellaneous > Database Design >  constraint for replacing primary key

## zio_mangrovia

If I have a table where primary key is composed by 4 attributes and I'm going to introduce the new attribute ID as primary key, which will replace the previous one. It's necessary to insert constraint for the 4 attributes? This constraint will avoid to insert records having the same values in 4 the attributes. 
What do you think? It's necessary to insert the constraint?

----------


## skhanal

If you must keep the combination of 4 attributes unique, then you will need to have a unique key constraint.

----------

