How apps talk: client, server and database
Learn the three parts behind every app: client, server and database. Follow one tap on Add task, then meet tables, keys, indexes, views, triggers and the all-or-nothing rule.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: a diner. The guest orders. The waiter carries the order. The kitchen applies the rules. The pantry holds the stock. The guest does not walk into the pantry.
Daily List is a made-up to-do app (SYNTHETIC / TRAINING ONLY). Lily taps Add task on her phone. Sam, the , draws who does what before he writes a requirement for Nina, the .
What it is: A client is the part a person touches, such as the phone app. A server is the computer that receives the request and applies the product rules. A database is the organised store of facts, such as the tasks. (Structured Query Language) is a language the server can use to ask that store a question or to add a row. A table is a grid, a row is one task, and a column is one fact. The neighbour of the database is the server. In this example the server holds the authoritative shared list; the phone may cache a copy for display or offline work.
Read the diagram as text
- Browser to server: 1. The browser sends an HTTP GET request to the web server.
- Application input: 2. The web server passes request data to the web application. The diagram lists URL encoding, GET or POST data, and cookies as possible input types.
- Data and templates: 3. The application exchanges data with the database. HTML templates can come from the Files area.
- Response: 4. The application returns HTML to the web server. 5. The web server sends an HTTP response to the browser.
- Rendering and static files: 6. The browser uses HTML, CSS and JavaScript. 7. The web server can also get static CSS, JavaScript, images and other files.
Unchanged MDN illustration of a dynamic HTTP GET request. The Daily List example later describes a separate write path.
Why it matters: A free plan may hold only three lists. If that rule lives only on the phone, a changed app can skip it. Sam asks whether the check is on the phone, the server, or both.
One waiter walks one order. The app can carry many requests at the same time.
PLAIN WORDS · 1 in this section
- pantry
- a cupboard or room where food is stored
PICTURE IT
The picture is the one the lesson above opens with. The table below shows how each part of it matches the work.
THE REAL JOB The picture helps a newcomer remember who does what in an app: the client asks, the server decides, and the database remembers.
- Tap in the app
- Request travels
- Server checks rules
- Database stores
- Response returns
HOW THE PICTURE MAPS
| In the picture | In the work |
|---|---|
| The guest who orders | The client, the app the user touches |
| The waiter carrying the order | The request and the response travelling over the network |
| The kitchen that cooks by its recipes | The server that applies the product rules |
| The pantry that holds the stock | The database that keeps the facts |
| The kitchen checking an order before cooking | The server checking rules before saving |
WHERE THIS PICTURE STOPS
- A waiter walks one way at a time, but an app can send many requests at once.
- A diner has one kitchen. A real product has many servers and several databases.
- A guest never sees the pantry, but a rule hidden in the database can still change what the guest gets.
HOOK
The guest asks, the kitchen decides, the pantry remembers.
REMEMBER IT THIS WAY
A rule of thumb: if you see this, think that.
A rule such as three lists on a free plan usually lives on the server, which checks it before the database saves Lily's new task.
| In the trick | What it stands for |
|---|---|
| Server | Applies the product rules |
| Database | Keeps the facts, such as every task |
| Client | The phone app Lily touches |
A real product has more parts than three, so a rule may live in more than one place.
TELL A FRIEND
An app has a client that people touch, a server that runs the rules and a database that keeps the facts. A tap becomes a request, and the reply comes back as a response.
OFTEN MIXED UP WITH How software gets built: plan, build, test, release. That topic shows how a team turns an idea into . This one shows the parts of the finished software and who does what inside it.
PRACTISE AND KEEP
Sources for this topic — 6 sources
- Market practice
Client-server architecture (Educative course lesson) ↗ — Educative · Client-server architecture (Educative course lesson): a client sends a request, a server processes it and queries the database (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
PostgreSQL documentation ↗ — The PostgreSQL Global Development Group · PostgreSQL documentation, current manual: the tutorial and queries chapters describe tables, rows, columns and how a query picks rows (search excerpt, page not opened)
An implementation, not the standard — which is the point. ISO/IEC 9075-2 is paywalled, and this documents the same constructs in text anybody can open. Its isolation-level chapter attributes to the standard explicitly, so it can carry a standard-level claim as long as the citation says which document it is quoting.
Cited as market practice rather than an official standard by kind: an engine's manual is authoritative about that engine and is not the obligation. Where a question turns on behaviour PostgreSQL chose rather than behaviour SQL requires, the answer has to say so.
One correction carried here because it circulates widely: the sentence "The fundamental difference between WHERE and HAVING…", quoted all over the internet as PostgreSQL documentation, is not in the current documentation. It was searched for in the source tree and is not there.
Read through a mirror, because the publisher's own domain could not be fetched (a reachability gap, not a statement about the publisher). A 403 there is a policy refusal and says nothing about whether the document exists or is reachable elsewhere.
Anyone on an unrestricted network should open the canonical URL above and confirm the section and page numbers cited against it. Every claim drawn from this entry is written so that it can be checked against a numbered page.
Read from the
postgres/postgresdocumentation source tree (doc/src/sgml), which the project itself maintains and which carries the section ids the published URLs are derived from — so a cited section id can be checked against the rendered page. - Market practice
Differences between online analytical processing (OLAP) and online transaction processing (OLTP) (Redgate blog) ↗ — Redgate · Differences between online analytical processing (OLAP) and online transaction processing (OLTP) (Redgate blog): day to day systems avoid repeated data and reporting stores often repeat it on purpose (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Simplified educational illustration
Payments Signal editorial teaching models — Payments Signal
What this simplifies: Daily List, its tables and the people are invented. Real products split work into more parts than three. The all-or-nothing rule, views, procedures and triggers are described in plain words from common practice, with no single source.
Used wherever diagrams, scenarios, figures, or example values are didactic constructions rather than sourced facts; every such use carries a simplifications disclosure. All people, companies, banks, and list entries in examples are fictional.
- Market practice
Transaction Isolation (PostgreSQL documentation, current version) ↗ — PostgreSQL Global Development Group · PostgreSQL 18 manual §§5.5,5.9,9.2,13.2. Read isolation table/default statement snapshots; comparison and row-security pages opened separately. IS DISTINCT FROM handles NULL; RLS explicitly permits database per-user checks. Existing SQLite3.40.1 observations remain version scoped.
PostgreSQL18 publisher documentation opened on6November2026: §13.2 isolation levels and Read Committed snapshots. No execution on PostgreSQL is claimed; engine-specific examples remain scoped to18.
- Market practicePostgreSQL 18 §5.9 Row Security Policies
PostgreSQL 18 §5.9 Row Security Policies ↗ — PostgreSQL Global Development Group · PostgreSQL 18 §5.9 Row Security Policies. Per-user row policies, enabled default-deny, table-owner/superuser/BYPASSRLS exceptions.
Primary text read6November2026; see domain audit for scope and limits.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.
