Concept Flow - Primary key behavior
Define Model
Primary Key Field?
Use defined
Save instance
→Assign PK value
PK must be unique
Instance saved in DB
This flow shows how Django handles primary keys: if you define one, it uses that; if not, it adds an 'id' field automatically. The primary key must be unique for each saved instance.