HomeServicesDatabase Design

Database Design in New Zealand

Database design is the one decision in a software project that everything else is stuck with. Most of the expensive problems in year three were settled in week two.

$20k+

Typical project value

2 min

To post a project

What do you need built?

Start here and add detail as you go.

Free - No obligation - Your details stay private

What people usually mean by database design

A database design brief usually arrives one of two ways: something is being built and somebody sensible wants the foundation right, or something already exists and has become slow, unreliable or impossible to change. Both are worth paying for, and the second is far more common than anyone admits.

Design for something being built

The schema behind a new application: entities, relationships, keys, constraints and how it will be queried. Usually a few weeks alongside the build.

Rescue a database that has slowed down

Queries taking seconds that took milliseconds, timeouts under load, or an application that gets slower every month. Diagnosis first, then indexes, queries and sometimes structure.

Turn a spreadsheet into a real database

A spreadsheet that outgrew itself — several people editing, formulas nobody dares touch, and version confusion. Modelling the data properly is most of the work.

What it costs

Indicative ranges from projects posted here. Use them to sense-check a quote, not to budget precisely.

Design review or schema for a new build

Model, keys, constraints, indexing strategy and documentation.

$8k – $25k

Performance rescue

Diagnosis, query and index work, and a written account of what was wrong and why.

$15k – $45k

Restructure a live database

Changing the model under a running system, with migrations, backfill and no downtime.

$45k+

Questions worth asking a provider

·How will this data be queried? Show me the design follows the questions we will ask.

·Which rules are enforced by the database itself, and which rely on the application getting it right?

·What is the plan for changing the schema after go-live, without downtime?

·How do we know this will still be fast at ten times the data?

·What documentation do we get, and can our next developer read it?

Common questions

How much does database design cost in New Zealand?

Designing the schema for a new application, or reviewing one before it is built on, is $8,000 to $25,000. Diagnosing and fixing a database that has become slow is $15,000 to $45,000. Restructuring a live database — changing the model under a running system with migrations and backfill — starts around $45,000 because it has to happen without downtime.

Our system has got slow. Is it the database?

Usually, and usually it is queries and indexes rather than hardware. The common causes are a query that loads far more rows than it needs, a missing index that was fine at ten thousand records and is not at two million, or an application making hundreds of small queries where one would do. Insist on diagnosis before anyone quotes a fix; a proposal to add hardware without measuring first is a proposal to spend money on a guess.

SQL or NoSQL?

SQL — PostgreSQL, SQL Server, MySQL — unless you can say why not. Relational databases enforce rules the application would otherwise have to remember, handle relationships properly, and every developer you hire next will know them. Document databases earn their place for genuinely schema-less data, very high write volumes, or content that is naturally one document. A developer who proposes NoSQL for ordinary business data should be able to say what problem it solves for you.

Should rules live in the database or the application?

The ones that must always be true belong in the database: foreign keys, unique constraints, not-null, check constraints. Applications get rewritten, integrations arrive later, and someone eventually runs a script. Constraints are the only thing that holds when that happens. Business logic that changes with policy belongs in the application. A schema with no constraints at all is a warning: it means the data is only as good as every piece of code that has ever touched it.

How do we change the schema once we are live?

With versioned migrations, applied the same way in every environment, and written so they can run while the system is up. Adding a column is easy; renaming one, splitting a table or changing a type needs a staged approach — add, backfill, switch, remove — over several releases. Ask how migrations are handled before the build. Projects without a migration discipline end up afraid of their own database.

Database Design projects open right now

Titles and categories are public. Full briefs, budgets, regions and buyer detail are visible to approved providers only.

Updated daily

No open projects in this category right now. New briefs are posted every week.

Design follows the questions you will ask

A database is not a filing cabinet. It is shaped by what you will ask of it, and the most common design failure is a model that stores everything beautifully and answers nothing quickly.

Before anyone draws a diagram, write down the questions the system has to answer:

  • "Show me every open job for this customer, newest first."
  • "What did we invoice last month by product line?"
  • "Which of these two thousand records changed since Tuesday?"
  • "Who touched this record, and what did it say before?"

Those questions decide the keys, the indexes and how history is kept. A designer who asks for them is doing the job. One who asks only what you want to store is drawing a picture.

Constraints are the only thing that holds

The application will be rewritten. An integration will arrive that nobody planned for. Someone will run a script at 11pm to fix something urgent. Through all of that, the only rules that survive are the ones the database itself enforces.

What belongs in the schema:

  • Foreign keys — so an order cannot reference a customer that does not exist.
  • Unique constraints — so you do not end up with the same invoice number twice.
  • Not null on the fields that genuinely must have a value.
  • Check constraints for the rules that are always true — a quantity is not negative, an end date is not before a start date.

A schema with none of these is a warning sign. It means the data is only ever as good as every piece of code that has ever written to it, and you will find out which one was wrong when the reports stop reconciling.

Business rules that change with policy belong in the application. The distinction is whether the rule could ever legitimately be false.

If it is slow, measure before you spend

Databases that have got slow have almost always got slow for one of a few reasons:

  • A missing index that was unnecessary at ten thousand rows and is essential at two million.
  • A query loading far more data than it needs and discarding most of it.
  • An application making hundreds of small queries in a loop where one would have done.
  • Growth in a table nobody is archiving — audit logs and event tables are the usual culprits.
  • Locking, where one long operation blocks everyone else.

Every one is diagnosable. Insist on measurement before a fix is quoted: which queries are slow, how often they run, and what the database says it is doing. A proposal to add hardware without that is a proposal to spend money on a guess — and hardware usually buys a few months at best.

Migrations decide whether you can change anything

The schema will need to change after go-live. How that is handled is a decision worth making before the first release.

What good looks like:

  • Every change is a versioned migration file, in source control, applied the same way in every environment.
  • Nobody changes production by hand.
  • Migrations run while the system is up.
  • Difficult changes are staged — add the new column, backfill it, switch the code, remove the old one — across several releases.

Teams without this discipline become afraid of their own database, and that fear is what turns a two-day change into a three-month project. Ask how migrations work before you sign anything.

Spreadsheet to database is mostly modelling

If the brief is a spreadsheet that has outgrown itself, the technical work is small and the modelling work is not. A spreadsheet lets you put anything anywhere, and that freedom has always been used.

Expect the project to surface:

  • Columns holding two things at once, separated by a slash.
  • Rows that are really notes, or subtotals, or a heading someone added.
  • The same entity written five ways.
  • A rule that lives only in one person's head and one formula.

That is the project. Budget your own people's time for the decisions, because only they can make them, and expect the result to be better than the spreadsheet in ways that take some getting used to.

Design for deletion

Under the Privacy Act you have to be able to remove a person's information when there is no longer a reason to hold it. That is a schema decision made at the start or an expensive retrofit later.

Practically: know which tables hold personal information, avoid copying it into six places, and decide early whether deletion means removing rows or anonymising them so history and totals still reconcile. Ask each designer how they would handle a deletion request. It takes ten seconds and separates experience from enthusiasm.

Comparing five quotes

Read for:

  • Who asked what questions the data has to answer?
  • Who talked about constraints in the database rather than validation in the app?
  • Who insisted on measuring before quoting a performance fix?
  • Who described how schema changes happen after go-live?
  • What documentation is included, and could your next developer read it?

Describe what the system does, roughly how much data you expect in three years, and the reports that must be fast. Designers who have done this will start by asking what you need to ask the data.

Related services

Not quite what you are after? These are the briefs most often confused with database design.

Get up to 5 quotes for your database design project

You choose who may contact you. Free to use, no obligation.

Start your project