DevPrep

All topics › Databases & storage

General concepts

Junior PRO

Essence

A relational database stores data in tables (in theory, "relations"): rows are records, columns are typed attributes. Links between tables are expressed through keys, not through nesting as in JSON.

The basic vocabulary an interviewer expects:

SQL (Structured Query Language) is a declarative language for describing a schema (DDL: CREATE TABLE) and for changing and querying data (DML: INSERT, UPDATE, DELETE, SELECT).

ORM (Object-Relational Mapping) is a layer that maps table rows to language objects and generates SQL for you. The upside is less hand-written code; the downside is hidden expensive queries (the classic N+1 problem).

The rest of this answer, with code and interview follow-ups, is in the DevPrep app.

Read the full answer in DevPrep

Practice this before your interview

DevPrep turns these answers into one-minute challenges: what does this code print, find the bug, mock interviews. One challenge a day.

Get DevPrep on the App Store