Database development

    Database development services: design, tuning and upgrades

    Most database trouble starts with a schema chosen in a hurry and a backup nobody has restored. Agnotic Technologies picks the database type for each workload, designs the schema, tunes queries from real plans, and runs changes, restores and upgrades without surprises.

    Database type per workloadSchema and index designZero-downtime changesTested restores

    Trusted by global innovators

    Benchmark
    Chibasco
    Fundency
    Lantimer
    Lauren
    Lera
    One Minute
    Pento Pix
    TAP
    Xtrium
    Healthevolve
    Benchmark
    Chibasco
    Fundency
    Lantimer
    Lauren
    Lera
    One Minute
    Pento Pix
    TAP
    Xtrium
    Healthevolve
    Benchmark
    Chibasco
    Fundency
    Lantimer
    Lauren
    Lera
    One Minute
    Pento Pix
    TAP
    Xtrium
    Healthevolve
    Benchmark
    Chibasco
    Fundency
    Lantimer
    Lauren
    Lera
    One Minute
    Pento Pix
    TAP
    Xtrium
    Healthevolve

    Database development

    What do database development services include?

    Database development services cover choosing, designing and running the databases behind your software. Agnotic Technologies picks the database type for each workload, designs schemas and indexes from real queries, ships schema changes without downtime, sets up backups with point-in-time recovery and tested restores, and runs major version upgrades of PostgreSQL, MySQL and SQL Server.

    This is engine-neutral work. It suits new products that need their first production schema, and live systems that have slowed down, become risky to change or fallen behind on versions.

    Engine-specific design has its own pages: DynamoDB key design, Redis caching and Oracle migrations are linked at the end of this page, and moving a database into AWS or Azure is part of our cloud migration work.

    Decision table

    Which database type fits each workload?

    The same question decides which big data databases suit a large workload: start from how data is written and read, not from its size alone. Many products end up with two types, a system of record plus a copy shaped for one job.

    Workload traitDatabase typeExample enginesMain trade-off
    Transactions that change several tables and must stay consistentRelationalPostgreSQL, MySQL, SQL ServerSchema changes need planning, and scaling writes past one primary takes sharding or a distributed SQL engine
    Records whose shape varies by customer, product or versionDocumentMongoDB, Azure Cosmos DB for NoSQLJoins move into the application, so some data is copied on purpose and kept in sync
    Lookups by a known key at very high volumeKey-valueAmazon DynamoDB, RedisEvery query must be known in advance; ad hoc reporting needs another store
    Large write volumes read back by partition, often across regionsWide-columnApache CassandraOne table per query and no joins, so the model follows the reads
    Questions about relationships several hops deepGraphNeo4j, Amazon NeptuneFast traversals; bulk aggregates across every record are better run elsewhere
    Time-stamped readings, metrics and eventsTime seriesTimescaleDB, InfluxDBBuilt for appends and time-range queries; retention and downsampling are planned from the start
    Full-text search, filters and relevance rankingSearch engineOpenSearch, ElasticsearchUsually a secondary copy fed from the system of record, so it needs a sync and a rebuild path

    Engine-level design for DynamoDB, Redis and Oracle lives on their own pages, linked below. Cassandra and Cosmos DB modeling follow the same rule: the reads decide the keys.

    Schema design

    How do we design a schema that lasts?

    Most schema regrets come from choices made before anyone wrote down the queries. We settle these four areas with your team and record why.

    Normalize first

    • Third normal form for data that many features write to
    • One fact stored in one place, so updates cannot disagree
    • Lookup tables instead of free-text status values

    Denormalize on purpose

    • Copied columns only where a measured read path needs them
    • A named owner and sync rule for every copy
    • Read models or materialized views for heavy reports

    Keys and constraints

    • Primary keys chosen for stability, not meaning
    • Foreign key, unique and check constraints enforced in the database
    • Soft delete only where the business needs history

    Types and tenancy

    • Tight data types, with time zones stored explicitly
    • Tenant ID on every tenant-owned table, or a schema or database per tenant when isolation demands it
    • Row-level security where the engine supports it
    Zero-downtime changes

    How do schema changes ship without downtime?

    We use the expand and contract pattern, so the old and new versions of your application can run against the same database during a release.

    1.

    Expand

    Add the new column, table or index next to the old one. New columns start nullable or with a default, and PostgreSQL indexes are built concurrently so writes keep flowing.

    Step 1
    2.

    Migrate

    The application writes to both shapes while a batched backfill copies existing rows. Batches stay small to keep locks short and replica lag low.

    Step 2
    3.

    Contract

    Once reads use the new shape and the checks match, a later release drops the old column or table. Until then, every step has a tested rollback.

    Step 3

    Query tuning

    How do we tune a slow database?

    We tune from evidence in the engine's own statistics, not from guesses about which index might help.

    1. Find the queries that cost the most

      pg_stat_statements in PostgreSQL, the slow query log or Performance Schema in MySQL, and Query Store in SQL Server show which statements use the most total time, not just the slowest single run.

    2. Read the real plan

      EXPLAIN ANALYZE or the actual execution plan shows where rows are scanned, sorted or misestimated. A badly wrong row estimate usually points to stale statistics or a skewed column.

    3. Fix the cause

      A missing or unused index, a query an ORM sends once per row, a function that hides a column from its index, or a lock held by a long transaction.

    4. Prove it on realistic data

      We test each change on a copy with production-like volume and read the plan again, because a fix that helps a small table can change nothing at full size.

    Recovery design

    Backups, replicas and failover we rehearse

    A backup is only proven by a restore. We design these four layers together and rehearse them before go-live.

    01

    Backups

    • Full or base backups on a schedule
    • Continuous log archiving for point-in-time recovery
    • Encrypted copies kept in a separate account or region
    • Retention matched to your recovery point objective
    02

    Restore tests

    • Scheduled restores into a scratch environment
    • Timed against your recovery time objective
    • Row counts and checksums compared with the source
    • Runbook updated after every rehearsal
    03

    Replication

    • Synchronous or asynchronous replicas chosen by risk
    • Read replicas for reporting traffic
    • Alerts on replica lag
    • Replication slots and log growth watched
    04

    Failover

    • Managed failover on Amazon RDS, Azure SQL or Cloud SQL, or a tested failover manager on self-run servers
    • Connection strings and pools that follow the new primary
    • Failover drills on a calendar
    • Fencing so two primaries never accept writes

    Upgrades

    What goes wrong in major version upgrades?

    PostgreSQL, MySQL and SQL Server upgrades fail in familiar ways. We check each one before the upgrade window.

    Challenge

    An extension, plugin or client driver the application depends on is not ready for the new version.

    Agnotic approach

    Inventory extensions, drivers and ORM versions first, and upgrade them in a separate release where needed.

    Challenge

    Query plans change on the new version and a few important queries get slower.

    Agnotic approach

    Capture plans and timings for the top queries, replay them on a restored copy running the new version, and compare.

    Challenge

    A SQL Server database moves to a new instance but jumps to the newest compatibility level untested.

    Agnotic approach

    Upgrade the instance first, then raise the database compatibility level as its own tested step with Query Store watching plans.

    Challenge

    Removed syntax, changed defaults and new reserved words break statements at run time.

    Agnotic approach

    Read the release notes for every version being skipped and run the full test suite against the new engine before the window.

    Challenge

    The upgrade overruns its window because the method was chosen late.

    Agnotic approach

    Choose between in-place upgrade, dump and restore, or logical replication to a new server early, and rehearse it on a full-size copy.

    Who brings us database work?

    Founders and engineering leads usually arrive with one of these.

    Startups designing their first production schema

    A design simple enough to ship now, with room to split tables or add a second database type later without a rewrite.

    SaaS products slowing as tenants grow

    Queries that were fine at launch now scan whole tables. We tune them and add tenant-aware indexes and partitioning.

    Teams on an end-of-support version

    A major version upgrade planned, rehearsed on a full copy and run inside an agreed window.

    Products adding search or reporting

    A search engine or reporting replica fed from the system of record, so the main database stays fast.

    Companies merging two databases

    Two schemas for the same customers or orders mapped, de-duplicated and moved with reconciled counts.

    Scope and cost

    What drives the cost of database development?

    We do not publish prices or a databases calculator, because cost comes from your schema, data and traffic. These are the factors we size on the scoping call.

    Databases and engines

    One PostgreSQL database is a different job from several engines that must stay in sync.

    Schema size and data volume

    The number of tables and the size of the largest ones decide how long backfills, restores and upgrade rehearsals take.

    Downtime you can accept

    A maintenance window allows a simpler method; zero downtime needs expand and contract steps or replication.

    Recovery targets

    How much data you can afford to lose, and how fast you must be back, decide the backup and replica design.

    Test coverage

    Good automated tests make schema changes and upgrades faster to prove.

    Regulated data

    Encryption, audit logging and access reviews for regulated data add design and evidence work.

    References

    Engines and documentation we work from

    Project and vendor documentation behind the design choices on this page.

    PostgreSQLMySQLSQL ServerMongoDBOpenSearch
    Facts and sources

    Facts behind database upgrades and recovery

    Support policies and behaviors from the PostgreSQL and SQL Server documentation that shape the plans on this page.

    Frequently Asked Questions

    It depends on how many databases are involved, their size and how much downtime you can accept. A slow-query review is a short piece of work; an upgrade or a merge of two databases includes rehearsals on full copies. We agree the scope and first deliverable on the scoping call.