Skip to content

Boarding pass · PostgreSQL Beginner

PostgreSQL · Beginner interview

An AI mock interview for developers new to PostgreSQL (0–2 years). Practise Postgres-specific basics, data types, everyday queries, and schema design — out loud, with a readiness score.

20–30 minEstimated6 questionsTailored live12 model answersTo study
  • Voice interview
  • Live feedback
  • Browser-only
  • No installation required

Your report · sample

AI Readiness Score

/100
Content score English score

Finish the mock and get this report — scored on content and English, with concrete tips and a model answer for every question, plus a study plan.

Your flight path

Five steps to interview-ready.

From a quick warm-up to a personalised study plan — here's the whole loop, and what you get at each gate.

  1. Step 01

    Preparation

    Skim the topics and warm up — you're briefed before takeoff.

  2. Step 02

    AI Interview

    A realistic AI interviewer asks tailored questions — answer by voice or text.

  3. Step 03

    Instant Score

    Finish and get a 0–100 readiness score across content and English.

  4. Step 04

    AI Feedback

    Concrete tips and a rewritten model answer for every response.

  5. Step 05

    Study Plan

    A personalised plan targets your weakest areas — so the next run scores higher.

Preview the AI demo

See one answer scored, end to end.

The whole loop on sample data — question, your answer, instant feedback and a study plan. Hover to pause.

aevrofy.com/session · live demoPlaying

Interviewer · Question 1

“Tell me about yourself.”

Who it's for

  • Developers new to PostgreSQL
  • Backend devs choosing a relational database
  • Anyone targeting junior roles using Postgres
  • Self-taught devs prepping for interviews

What you'll practice

  • Postgres basics, psql and sequences
  • Common data types including JSONB and arrays
  • Everyday queries and UPSERT
  • Keys, constraints and indexes

Topics covered

What this level expects.

Basics

  • What Postgres is
  • psql
  • SERIAL & sequences

Data types

  • Core types
  • JSONB vs JSON
  • Arrays & enums

Querying

  • SELECT/JOIN
  • UPSERT
  • RETURNING

Schema

  • Keys & constraints
  • Indexes
  • Schemas & search_path

Practice questions

12 questions, with model answers.

Read them, then run the live mock to answer out loud and get scored. Tap any question to reveal a model answer.

01What is PostgreSQL and why would you choose it?

PostgreSQL is a powerful, open-source, standards-compliant relational database known for correctness, extensibility, and a rich feature set — full ACID transactions, advanced data types (JSONB, arrays, ranges), window functions, full-text search, and strong concurrency via MVCC. You choose it for reliable transactional workloads where you want SQL plus modern features without licensing costs, and it scales from small apps to large systems.

02What is psql and how do you explore a database with it?

psql is Postgres's interactive command-line client. Beyond running SQL, it has backslash meta-commands: \l lists databases, \dt lists tables, \d tablename describes a table's columns and indexes, \du lists roles, and \x toggles expanded output. It's the quickest way to inspect a schema and run ad-hoc queries.

03What is a SERIAL column and how do sequences work?

SERIAL is a shorthand that creates an auto-incrementing integer column backed by a sequence object that hands out the next value on each insert. Modern Postgres prefers GENERATED ... AS IDENTITY for the same effect with cleaner semantics. The underlying sequence is a separate object you can query (nextval/currval); gaps are normal because sequence values aren't rolled back on failed transactions.

04What are some common PostgreSQL data types you should know?

Beyond the standard integer, numeric (exact decimals for money), text/varchar, and boolean, Postgres offers timestamptz (timestamp with time zone — almost always preferred over timestamp), uuid, json/jsonb, arrays, and range types. Choosing precise types (timestamptz for times, numeric for money, not float) prevents whole classes of bugs.

05What's the difference between JSON and JSONB?

json stores an exact text copy of the input (preserving whitespace and key order, re-parsed on each access), while jsonb stores a decomposed binary format that's faster to query and can be indexed (GIN), at a small write cost and without preserving formatting/duplicate keys. In practice you almost always use jsonb for storing and querying document data; json only when you need the exact original text.

06How do array and enum types work in Postgres?

Postgres columns can hold arrays of any type (e.g. text[]), with operators to query membership and unnest them into rows — handy for tags or small lists, though heavy relational use is still better normalized. An enum is a custom type with a fixed set of ordered values, giving readable, constrained values; the trade-off is that adding/removing enum values requires a type alteration.

07How do basic SELECT, WHERE, and JOIN work in Postgres?

They follow standard SQL: SELECT chooses columns, WHERE filters rows, and JOIN combines tables on a condition (INNER for matches only, LEFT to keep unmatched left rows). Postgres adds niceties like ILIKE for case-insensitive matching and rich expression support. The planner decides the actual join method (nested loop, hash, merge) based on statistics.

08How do you do an UPSERT in PostgreSQL?

Use INSERT ... ON CONFLICT, which inserts a row or, if it would violate a unique/primary key, takes an alternative action — DO NOTHING to ignore, or DO UPDATE SET ... to merge. It's atomic and avoids race conditions of check-then-insert. You specify the conflict target (the unique column or constraint).

INSERT INTO users (email, name) VALUES ($1,$2)
ON CONFLICT (email) DO UPDATE SET name = EXCLUDED.name;
09What does the RETURNING clause do?

RETURNING lets INSERT, UPDATE, and DELETE return columns from the affected rows in the same statement — most commonly to get a generated id or the final row state without a second query. It's a Postgres convenience that saves a round trip and avoids race conditions when you need the result of a write.

INSERT INTO orders (...) VALUES (...) RETURNING id, created_at;
10How do primary keys, foreign keys, and constraints work in Postgres?

A primary key uniquely identifies rows (creating a unique index automatically); a foreign key references another table's key and enforces referential integrity, with ON DELETE/UPDATE actions like CASCADE. Other constraints — NOT NULL, UNIQUE, CHECK — enforce rules at the database level. Pushing integrity into constraints means invalid data can't be written regardless of application bugs.

11What is the default index type in Postgres and when do you add one?

The default is a B-tree index, which speeds equality and range lookups and ordering — you add one to columns frequently used in WHERE, JOIN, and ORDER BY, especially foreign keys. Postgres creates indexes automatically for primary keys and unique constraints. Indexes cost storage and slow writes, so you index based on real query patterns, not every column.

12What are schemas and the search_path?

A schema is a namespace within a database that groups tables and other objects (e.g. public, or per-tenant/per-module schemas), so you can have same-named tables in different schemas. The search_path is the ordered list of schemas Postgres checks when you reference an unqualified name. Schemas help organize large databases and isolate tenants or environments.

Preparation tips

Walk in ready.

  • Get comfortable in psql with \d and \l
  • Prefer JSONB over JSON for stored documents
  • Know INSERT ... ON CONFLICT for upserts
  • Use RETURNING to get generated values back

Ready for the real thing?

Run a 6-question PostgreSQL mock interview, answer out loud, and get a readiness score with tips and model answers.

More beginner interviews

Aevrofy · PostgreSQL beginner interview prep