Database Software: From Data Model Evolution to Selection and Engineering Practices

    This article examines database software as the abstraction layer between applications and storage. It traces the shift from hierarchical and network models to relational systems and then to specialized, distributed, and multi-model databases; explains data independence, shared data and reduced redundancy, transactions and ACID, and concurrency control; compares relational, non-relational, and distributed databases; and provides practical guidance for selection, indexing, transaction scope, backup and recovery testing, access control, and monitoring.

    1. Definition and Core Value of Database Software

    Database software is system software used to organize, store, and manage structured data. It establishes a unified data model between applications and underlying storage, so business logic does not need to be concerned with how data is laid out on disk. Its core value has three aspects: data can be shared by multiple applications, constraints between data are maintained centrally by the system, and duplicated storage can be reduced to a minimum.

    In real systems, a database must also support concurrent access by multiple users and ensure the correctness of write operations. Order payment, inventory changes, account transfers, and similar scenarios depend on the transaction capabilities provided by the database. If data were simply written to files, developers would have to handle crash recovery, concurrent conflicts, and data validation themselves, which would be costly.

    2. Evolution

    The evolution of database technology can be broadly divided into three stages. Each stage responded to limitations in the previous generation.

    First Stage: Hierarchical and Network Models

    In the 1960s, early databases were mainly based on the hierarchical and network models. These systems established a three-schema architecture—external schema, conceptual schema, and internal schema—separating user views, logical structure, and physical storage. During queries, applications had to navigate record by record along predefined pointers or paths. Programs were tightly coupled to data structures, and maintenance costs were high when structures changed.

    Second Stage: Relational Model and SQL

    In the 1970s, the relational model was proposed. Data was organized as two-dimensional tables, and relationships between tables were established through keys. Query authors only needed to describe “what is needed,” while the system’s query optimizer decided “how to retrieve it.” SQL subsequently became the common interface standard for relational databases, making query statements highly portable across systems. After the 1980s, relational databases gradually became the mainstream choice for enterprise business systems.

    Third Stage: Diversification and Extension

    From the late 1980s onward, databases began to incorporate object-oriented modeling concepts and expanded toward distributed storage, multimedia data, time-series data, graph data, and other directions. At the same time, internet services brought massive data volumes and high-concurrency reads and writes, giving rise to non-relational and distributed databases. Today’s database ecosystem has a multi-layered structure: general-purpose relational systems handle core transactions, specialized systems handle specific workloads, and distributed systems address horizontal scaling requirements.

    3. Key Technical Characteristics

    Data Independence and a Unified Data Model

    Data independence means that applications are isolated from the storage structure of data. Logical independence allows table structures to be adjusted without modifying applications, while physical independence allows storage methods to be changed or indexes to be adjusted without changing the logical structure. A unified data model is the foundation for achieving this. Developers describe data through abstractions such as tables, documents, key-value pairs, or graphs, and the database is responsible for the underlying implementation.

    Data Sharing and Minimal Redundancy

    Multiple business systems access the same data, avoiding inconsistencies caused by each system maintaining its own copy. Databases reduce redundant fields through normalization and ensure data integrity through mechanisms such as foreign keys, unique constraints, and non-null constraints. Minimal redundancy does not mean zero redundancy. In read-heavy, write-light scenarios, reasonable denormalization or cached copies can often provide clear performance benefits, but such redundancy requires an explicit synchronization strategy.

    Transactions and ACID Properties

    A transaction is a set of operations that either all succeed or all are undone. The classic ACID properties include atomicity, consistency, isolation, and durability:

    • Atomicity: All operations in a transaction are committed or rolled back as a single unit.
    • Consistency: Data satisfies all constraints before and after the transaction.
    • Isolation: Intermediate states of concurrent transactions are not mutually visible, and the isolation level can be configured as needed.
    • Durability: Once a transaction is committed, its result is retained even if the system fails.

    The following example shows transaction processing for an account transfer.

    1. BEGIN;
    2. UPDATE account SET balance = balance - 100 WHERE id = 1;
    3. UPDATE account SET balance = balance + 100 WHERE id = 2;
    4. COMMIT;

    If the second statement fails, the application should roll back so that the debit from the first statement is also undone. In this way, the total amount of funds remains conserved at all times.

    Concurrency Control

    Concurrency control addresses conflicts when multiple transactions read and write the same data at the same time. There are two common approaches. The first is lock-based pessimistic concurrency control, in which a transaction acquires locks before accessing data; this is suitable for scenarios with frequent write conflicts. The second is multiversion concurrency control, in which read operations read historical versions of data and reads and writes do not block each other; this is suitable for read-heavy workloads. The choice of isolation level directly affects concurrency performance and data correctness, so developers need to make trade-offs based on business tolerance.

    4. Main Database Types

    Relational databases are centered on tables, rows, columns, and relational constraints. They support standard query languages and full transaction semantics and are suitable for orders, accounting, user profiles, and other business domains with clear structures and high consistency requirements.

    Non-relational databases broadly refer to systems that do not use the traditional two-dimensional table model. They generally include the following categories:

    • Key-value stores: Values are located by key, with low read/write latency; suitable for caching, session management, and similar scenarios.
    • Document stores: Data is organized as semi-structured documents, and fields can change flexibly; suitable for content management and configuration data.
    • Column-family stores: Data is organized by column; suitable for massive writes and analytical scenarios involving column-based aggregation.
    • Graph databases: Entities and relationships are represented by nodes and edges; suitable for relationship network analysis and path queries.

    Distributed databases partition data across multiple nodes and use replicas and consensus protocols to ensure availability and consistency. They target scenarios where data volume and throughput exceed the capacity of a single machine, but they introduce additional complexity such as network latency, partition tolerance, and cross-node transactions.

    5. Selection Approach

    Database selection should not start from product popularity, but from data characteristics and access patterns. It can be evaluated through the following steps:

    1. Map the data structure. If relationships between data are complex and constraints are numerous, the relational model is usually more suitable. If the data structure changes frequently and is mainly read and written as complete units, the document model is more natural.
    2. Analyze access patterns. Examine the read/write ratio, peak concurrency, and query types to determine whether the workload is transactional or analytical.
    3. Evaluate consistency requirements. Operations involving funds and inventory require strong consistency; scenarios such as browsing history and like counts can accept eventual consistency.
    4. Estimate data scale and growth rate. If a single machine can meet capacity and performance requirements, there is no need to introduce a distributed architecture prematurely.
    5. Consider team capabilities and operational costs. The ability to handle backup and recovery, monitoring and alerting, version upgrades, and failover determines whether a system can run stably over the long term.

    6. Engineering Practice Recommendations

    In engineering practice, the following points can significantly reduce the risk of database-related failures.

    Design Indexes Carefully

    Indexes can speed up queries, but each index increases write overhead and storage usage. Use execution plans to analyze slow queries and create indexes only for frequently used query conditions. For example, if an orders table is often queried by user, the following index can be created:

    1. CREATE INDEX idx_order_user ON orders(user_id);

    Keep Transactions Short

    The longer a transaction holds locks, the more concurrency conflicts occur. Avoid remote calls, file reads and writes, and other time-consuming operations inside transactions, and keep transaction boundaries as short as possible.

    Test Backups and Recovery

    A backup file is reliable only after it has been verified through restoration. It is advisable to perform recovery tests in an isolated environment at regular intervals and record recovery time so that business interruption time can be estimated during a failure.

    Manage Access Permissions

    Application accounts should follow the principle of least privilege and be granted only the read and write permissions required by the business. Database connection information should be stored in environment variables or a secret management service, not written into code or configuration repositories.

    Monitor Key Metrics

    Connection count, slow query count, lock wait time, replication lag, and disk usage are core metrics for judging database health. Integrating these metrics into a unified monitoring and alerting system can help detect anomalies before problems expand.

    7. Conclusion

    The essence of database software is to provide a reliable, unified abstraction between data storage and application logic. From hierarchical and network models to the relational model, and then to distributed and multi-model systems, each evolution has aimed to better handle the tension among data scale, structural complexity, and concurrent access. By understanding the fundamental principles of data models, transaction semantics, and concurrency control, developers can make decisions that match business requirements during selection and maintain data correctness and availability after systems go live.