A primary key value names one parent row.

highlighted = computed this step

Primary key is unique

A primary key works only when no two parent rows share the key value.

one id, one parent row\text{one id, one parent row}

Check duplicates

The unique flag is yes, with 0 duplicate key values.

duplicates=0\text{duplicates}=0

Key examples are tiny finite table checks; SQL dialects, indexing, query planning, deferrable constraints, enforcement timing, performance, and product behavior are out of scope.

Primary key is unique: parent tablecustomer_idname1Ada2Ben3Cy Primary key is unique: child tableorder_idcustomer_idtotal101150102230103170 key columnsparent keychild foreign keycustomer_idcustomer_id child-to-parent linkschildRowchildValueparentRowsstatus01[0]match12[1]match21[0]match duplicate parent keysvalueparentRowsnonenone dangling referenceschildRowvaluestatusnonenonenone key factsfactvalueparentRowCount3childRowCount3duplicateParentKeyCount0referenceCount3danglingReferenceCount0parentKeyUniqueyesvalidyesdeleteStatusnone

Empty duplicate table

The duplicate-parent-keys table says none, so every parent id names one row.

unique parent ids\text{unique parent ids}

Summary

The compiler recomputes uniqueness from the actual parent rows.

not hand labeled\text{not hand labeled}