Composite Primary Key for a Content Type
An easy way to do this is with the Unique Field.  This provides a WYSIWYG interface for adding node validation to the node save form to check one or more fields' uniqueness.

The module is not bulletproof, though.  There are some scenarios where you can get around it.


  This module is intended to function when a node is being validated prior to being created or updated. It does not prevent nodes from being programmatically saved with duplicate values (including when a node is reverted to an earlier revision).


The reason is that the check is done at the code level via validation and is not a database enforcement via composite keys.

A similar module, that also provides a lot more features in addition to the uniqueness check, is Field Validation.

If you want to give the composite key thing a shot, I would make a test site and edit one of the field tables by hand to make the composite key.  Then install/enable Unique Field and see what happens with the cases that the module doesn't cover.