Unique Key
An Unique Key is a Relational Model that ...
- See: Database Constraint#Constraints, Relational Model, Superkey, Database, Set (Mathematics), Tuple, Compound Key, Data Type.
References
2017
- (Wikipedia, 2017) ⇒ https://en.wikipedia.org/wiki/unique_key Retrieved:2017-4-17.
- In database relational modeling and implementation, a unique key is a superkey — that is, in the relational model of database organization, a set of attributes of a relation variable for which it holds that in all relations assigned to that variable, there are no two distinct tuples (rows) that have the same values for the attributes in this set.
When more than one column is combined to form a unique key, their combined value is used to access each row and maintain uniqueness. These keys are referred to as aggregate or compound keys. Values are not combined, they are compared using their data types.
When a column or set of columns is defined as unique to the database management system, the system verifies that each set of values is unique before assigning the constraint. After the column(s) is(are) defined as unique, an error will occur if an insertion is attempted with values that already exist. Some systems will not allow key values to be updated, all systems will not allow duplicates. This ensures that uniqueness is maintained in both the primary table and any relations that are later bound to it.
- In database relational modeling and implementation, a unique key is a superkey — that is, in the relational model of database organization, a set of attributes of a relation variable for which it holds that in all relations assigned to that variable, there are no two distinct tuples (rows) that have the same values for the attributes in this set.