What Is Database Design? How to Build a Fast, Scalable Data Model

Database design is the work of organising the data a piece of software stores into the right tables, relationships between tables, data types and indexes. A well-designed database stays fast and consistent for years; a badly designed one slows down as the number of users grows and produces inconsistent reports.
I start every piece of software I write from the database, not from the screen. An interface can be changed, but fixing a wrongly built data model in a live system is far more costly.
What makes a good database design
- No duplicated data (normalisation): A customer's address lives in one place; when it changes, it is updated everywhere.
- Correct data types: Amounts are stored as decimals and dates as date types, so calculation errors are prevented from the start.
- Integrity rules: The invoices of a deleted customer are not left orphaned; foreign keys and constraints protect the data.
- The right indexes: Indexing the most searched fields brings searches across millions of records down to milliseconds.
- Scalability: In multi-tenant systems, each company's data is separated securely.
What is normalisation?
Normalisation is the method of splitting tables into logical parts to avoid repeating data. For example, instead of writing the company name on every row of a weighing record, companies are kept in a separate table and the weighing table stores only the company number. When the company name changes, there is no need to update thousands of rows.
How do you speed up slow queries?
- Measure the query: Find the bottleneck with the slow query log and EXPLAIN output.
- Add missing indexes: Fields used in WHERE, JOIN and ORDER BY are indexed.
- Don't fetch unnecessary data: Select only the fields you need instead of SELECT *, and use pagination.
- Put calculations in the right place: Use views, stored procedures or summary tables for frequently used totals.
- Plan for data growth: Old records are moved to archive tables.
MySQL or MS SQL Server?
| Criterion | MySQL / MariaDB | MS SQL Server |
|---|---|---|
| Licence | Open source | Paid (Express edition is free but limited) |
| Common use | Web and SaaS applications | Enterprise desktop and Windows infrastructure |
| Server | Linux and Windows | Mostly Windows |
| Strength | Lightweight, fast, low cost | Advanced T-SQL, reporting and management tools |
In my web-based and multi-tenant products I use MySQL/MariaDB; in desktop and enterprise systems built with Delphi I mostly use MS SQL Server.
Examples from my projects
- Online Kantar - multi-tenant cloud database
- Weighbridge Automation Software - built on MS SQL Server
- B2B Order Management System - SQL Server and API synchronisation
Frequently asked questions
Can my existing slow database be fixed?
Yes. In most cases, the right indexes, query improvements and small structural changes give a significant speed boost without rewriting the system.
How should database backups be done?
Backups should be automatic, scheduled and copied off the server, and restoring them should be tested regularly.
Can my spreadsheet data be moved to the new system?
Yes. The data is cleaned, validated and imported into the new database structure.
For database design or performance problems, get in touch with me.


