Sekundærnøkkel
Sekundærnøkkel is a term used in database management. It refers to one or more columns in a table that are not the primary key but are used to uniquely identify or efficiently retrieve rows. Unlike a primary key, which must be unique and non-null, a sekundærnøkkel can contain duplicate values and can be null. However, a sekundærnøkkel is often constrained to be unique to enforce data integrity if it represents a business rule, such as a unique email address for a user.
The primary purpose of a sekundærnøkkel is to improve query performance. By creating an index on the
While a primary key guarantees uniqueness across all rows, a sekundærnøkkel might enforce uniqueness through a