Briefle
LearnGlossaryPricing

Briefle words · Code & architecture

Composite primary key

A unique identifier for a row made from two or more columns together.

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 PRIMARY KEY (student_id, course_id) means a student can be enrolled in each course only once.

Related words

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

Room 5 · APIs & data

Learn “Composite primary key” in a five-minute lesson

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