Glossary term
What is PK / FK (Primary Key / Foreign Key)?
PK / FK stands for Primary Key / Foreign Key.
PK uniquely identifies a row; FK points to a row in another table. Example: orders.user_id (FK) → users.id (PK).
Learn it properly · System DesignLesson 5: SQL Basics Every System Designer NeedsBefore sharding, replicas or NoSQL, learn to use one relational database well. Tables and keys, the queries you will write every day, indexes and EXPLAIN, the N+1 trap, transactions, and the connection limit that takes databases down.