Database Design and SQL Development

Designing data structure, queries and reports for digital products. We work with integrity, competitive change and measurable performance.
Technology Capabilities
Product model
Related entities, keys and data integrity rules.
Management report
Selection and aggregation with verifiable meaning of each indicator.
Measurable optimization
Queries and indexes for real operations and data volume.
BIG FISH · SQL
Working with data
Work with SQL databases is reflected in the reporting interface: what indicators to compare, for what period and with what detail. We design tables, filters and charts so that the result can be checked against the source records.
For analytical dashboards and CRM, we think about units of measurement, missing values and update times. An empty sample is different from zero, and changing the filter should not imperceptibly change the meaning of the indicator.
SQL / 01
Subject model
Tables reflect entities and relationships: customer, order, item and payment. We define keys, required fields and acceptable states. We do not store several independent copies of the amount without a rule for their coordination. We record the price history in the order item so that updating the directory does not change the previous financial result.
Check on the project
Order history is experiencing price update.
SQL / 02
Data integrity
Unique constraints, foreign keys, and value checks support base-level rules. Specific capabilities depend on the selected DBMS and version. We check imports and administrative operations that may bypass the application interface. The error must be detected before incorrect records are included in the report or integration.
Check on the project
The duplicate key is rejected by the database.
SQL / 03
Joins and aggregation
When connecting an order to line items, the same order amount may be repeated several times. Therefore, we first determine the report line level, then the grouping and aggregates. We check customers without orders, canceled transactions and empty periods. We compare the overall result with a small manually verified sample before trusting the larger report.
Check on the project
The connection does not double the order amount.
SELECT branch_id, SUM(amount_minor) AS paid_total
FROM orders
WHERE status = :status AND branch_id = :branch
GROUP BY branch_id;SQL / 04
Indexes and Plans
We design the index for real conditions of selection, connection and sorting. The order of the fields in a composite index matters. The execution plan helps understand the chosen access method, but is evaluated in conjunction with the volume and distribution of data. In the demo, we show the number of lines viewed in the JavaScript model, and not a measurement of the speed of a real DBMS.
Check on the project
Both access methods give the same result.
SQL / 05
Transactions and Competition
Two users can simultaneously change one order or reserve the last item. We select the appropriate isolation level and blocking or versioning strategy. Checking for deadlocks and safe replays. We keep the transaction short enough: waiting for an external HTTP service inside a block can interfere with the entire queue of operations.
Check on the project
Competing changes do not lose data.
SQL / 06
Schema migrations
Adding a required field to a large table requires a plan to populate the existing data. We release changes taking into account the simultaneous operation of the old and new code. We check the duration of blocking on a comparable volume. Reverse migration does not always restore deleted values, so dangerous transformations require a separate backup.
Check on the project
A large table is migrating according to a consistent plan.
SQL / 07
Access and queries
The application user receives only the necessary base rights. We parameterize values, limit dynamic names of tables and fields. We check the isolation of company data in all requests, including uploads. A hidden interface filter cannot be considered a protection against access to other people's records. Query logs should not uncontrollably expose sensitive data.
Check on the project
The upload does not contain a foreign organization.
SQL / 08
Recovery and Surveillance
Agree on acceptable data loss and recovery time. A backup is only useful if it can be restored and verified. We are seeing slow queries, table growth, and locking errors. Replication can help availability and readability, but it is not a replacement for redundancy: an erroneous deletion can spread to the replica.
Check on the project
The recovery time was checked on the copy.
Frequently asked questions
Is this a ready-made solution?
No. The example shows a projected script for SQL. We develop the working system according to your requirements, data and integrations.
Can existing systems be preserved?
First we study exchange interfaces, data owners and restrictions. The result may be integration, staged migration, or replacement of only a single component.
What will we get when transferring the project?
The agreed package includes design, source code, environment requirements and operating instructions. The scope of work, rights and support are fixed in the contract.