Tag view

#keys

Cross-subject tag search for related interview cards.

Clear

Results update as you type. Press / to jump straight into search.

Tagged with keys

2 cards

React Easy Theory

Lists and keys in React

React uses keys to identify list items across renders so reconciliation can preserve identity correctly.

  • Keys must be stable and unique within the list
  • Indexes can break identity when order changes
  • Keys affect correctness as well as performance

Lists and keys in React

SQL Easy Theory

Primary key vs foreign key

A primary key uniquely identifies a row in its own table, while a foreign key points to a related row in another table.

  • Primary key is table identity
  • Foreign key creates relationship
  • Helps enforce referential integrity

Primary key vs foreign key