primary key

The column, or columns, whose value uniquely identifies each row of a table and can never be NULL.

In more detail

The database refuses a second row with the same primary key value, and other tables point at a row through it. Many databases and object-relational mappers can generate the value automatically; in SQLite, for example, a single column declared INTEGER PRIMARY KEY is filled in on insert.

Examples

EF Core treats a property named Id as the primary key by convention.
In the browser: In IndexedDB the key path names the property used as the key, such as keyPath: 'id'.
@Id private String id;
id INTEGER PRIMARY KEY

Related terms

Taught in

References