Iordaighe Ilie-Alin.
All articlesWeb Development

When a Website Needs a Database

Iordaighe Ilie-Alin · November 25, 2026

When a Website Needs a Database

A website can present a dozen services, a portfolio of projects, and several articles without writing anything to a database at runtime. The same website might need durable storage the moment a customer must reserve a place or an editor must save a private draft. The decision starts with how the site will use information. Page count gives a rough sense of volume, while the people and actions involved reveal the actual requirements.

Ask who changes the information

Consider a hypothetical solo consultant with a public portfolio. The consultant adds one project every few months and is comfortable editing Markdown. A file for each case study may be enough. Version history captures edits, preview deployments can show proposed changes, and the published site can serve the resulting pages without issuing a content query for every visit.

Now imagine a small studio where several people edit cases. They need accounts, image uploads, and an approval step. The same public pages could still be generated ahead of time, but the editing experience now needs somewhere to store drafts and record their status. A managed CMS might provide that storage and interface. The studio may not need to design or run its own database simply because its editing workflow has become more involved.

Write down the steps of a real update, starting with who requests it. Trace where a draft exists, who approves it, how it appears publicly, and how a mistake gets corrected. A workflow that asks the developer to rebuild the site for a quick copy change may be acceptable for a static launch. The same step can become the bottleneck if the team needs to make many changes in a day.

Identify which data must change together

A collection of published articles can often tolerate a small delay between an edit and the next build. A reservation cannot always tolerate the same delay. If two people try to reserve the last place in a workshop, the system needs a reliable decision about which request succeeds. That depends on how the application records availability and handles competing writes.

List the operations where mistakes cost time, money, or trust. A site might need one active booking for a time slot, a reliable association between a customer and an order, or an audit trail of who changed a status. A database can enforce some of those rules near the data. The interface can still validate inputs and explain what happened, but the shared record needs to stay consistent even when two requests arrive together.

A contact form falls somewhere between content and transactions. If it just delivers a message to a business inbox, a suitable form service may meet the need. If the organization tracks assignments, response status, and conversation history in a dashboard, it needs durable records somewhere. Using a specialized service can be a better fit than building a database and workflow from scratch when the business already works in that service.

Be specific about search and relationships

Some filtering is easy with files or a generated index. A collection of thirty projects can be grouped by category at build time, and visitors can browse the groups without a server query. A listings site with frequent changes and several independent filters may benefit from querying a structured data store. The trigger is what a useful lookup needs to do under normal use.

Describe the queries people will actually make. “Find available workshops in this city during a specific week” needs date, location, and availability information. “Show the case studies in the design category” needs far less. If the same provider, tag, or location appears across hundreds of records, think about whether editing one copy should update every appearance. That question can reveal where separate records and relationships would reduce maintenance work.

Start with a clear model of what each thing represents. A workshop series and one dated occurrence are different entities. A blog post and its image can be stored separately without requiring a dedicated relational model if their relationship is simple. Modeling the things people edit and search for is more useful than adding tables for every visible part of a page.

Include the cost of running it

A database brings tasks beyond designing a schema. Someone needs to manage access, change the schema safely, understand backups, and investigate errors. A managed service helps with infrastructure, but the application still needs rules about who can read and write a record. Decide who owns those rules once the original developer hands over the site.

For a small project, look at how easily you can recover from ordinary mistakes. A versioned file edit can be reverted through the repository. For a database-backed site, confirm how an editor restores a deleted record and what a backup restore would affect. Ask whether the organization can export its data in a form another tool can read. These questions are easier to address while the content model is small.

Runtime availability matters, too. A public project page can often be served independently of the editor’s CMS. A dashboard that shows current bookings depends on live data. Choose which routes genuinely need that dependency. A single site can serve stable case studies as generated pages while using a database for things that must change immediately.

Decide using one concrete scenario

Write a short walkthrough for a visitor and an editor. Describe the changes they make, which ones must survive a refresh, which ones other people need to see, and what happens when two changes conflict. Use that list to evaluate files, a managed CMS, a service integration, or a database you operate. Pick the option that supports the actual workflow and leaves a reasonable way to migrate later.

A simple site stays simple when the storage matches the real work. A website needs a database or a service backed by one when its information must be edited, queried, or coordinated in ways the current setup cannot reliably support. Until that need is concrete, a smaller content system can give both the owner and the maintainer fewer things to operate.

Cover photograph by MarkBuckawicki on Wikimedia Commons, released under CC0.