Skip to main content

Assign primary keys to tables

Data-model setup · Step 3

Assign a stable identifier to each relevant table so NIM can recognize every record and connect related data correctly.

A primary key is the main identifier for a row in a data table. NIM uses it for intra-system relations, filter relation items, and primary-key Vault queries. For the conceptual difference between primary and reference keys, see Keys.

Select the right columnDirect link to Select the right column

Choose a column that is unique, populated, and unlikely to change. An immutable system-generated ID is usually the best option.

Strong primary-key choicesAvoid when possible
Permanent employee, student, or person IDDisplay name
Immutable directory object IDEmail address or user principal name
Connector-specific record IDDepartment name, job title, or location
A stable identifier supplied by the source systemA value built from other changing attributes
One main identity per tableEach table can have one primary key. Use a reference key only when you also need a separate, unique lookup value; do not replace a dependable system ID with a more readable display value.

Assign a primary key in NIMDirect link to Assign a primary key in NIM

  1. Expand the system’s table list.
  2. Open a table that needs a stable record identity.
  3. Select the Columns tab.
  4. Mark the selected identifier column as the table’s Key.
  5. Select Save.
  6. Repeat for every table that will participate in relations, matching, or a workflow that needs reliable record identity.

Validate the key before using itDirect link to Validate the key before using it

  1. Collect and load the system.
  2. Review sample rows and confirm that every applicable record has a value.
  3. Check that the value is unique and uses a consistent format.
  4. If the key will support a relation, compare its values with the foreign-key values in the related table.
warning

Do not use a column with duplicate, blank, or routinely changing values as a primary key. It can cause incorrect joins, missing relation results, and hard-to-diagnose filtering behavior.

Next stepDirect link to Next step

After keys are set, specify intra-system relations to connect the related tables in this system. If an additional unique lookup is needed, assign reference keys.