Briefle
LearnGlossaryPricing

Briefle words · Code & architecture

Foreign key

A column that points to a row in another table, and that the database guarantees actually exists.

Say it to an AI

Postgres migration for course enrollments, normalized to 3NF: separate students and courses tables, and an enrollments join table with foreign keys to both and a composite primary key (student_id, course_id). No student or course details duplicated in enrollments.

How an expert would brief the stronger version of “Enrollments schema”.

See it

Try it as a puzzle →

The first database migration for an online course platform, run in a Postgres client.

Study A · the weaker one
Study B · the stronger one

Why: B's student_id INT REFERENCES students(id) can't point to a student who doesn't exist; A just repeats 'Mia Chen' as text.

Related words

  • Single source of truth
  • Error code
  • Problem Details
  • Naming convention
  • REST
  • Resource
  • Path parameter
  • Pagination

Room 5 · APIs & data

Learn “Foreign key” in a five-minute lesson

Start free
AI can build almost anything. The bottleneck is saying what you want.
WordsPricingTermsPrivacyRefundsContact
© 2026 Briefle