{
  "id": "database-management-system",
  "title": "Database Management System",
  "lang": "en",
  "source_lang": "en",
  "summary": "A database management system is software that organizes, queries, protects, and maintains shared data while controlling access, consistency, concurrency, and recovery.",
  "category": "computer-science",
  "subcategory": "software",
  "type": "concept",
  "aliases": [
    "DBMS",
    "database management software"
  ],
  "generated_at": "2026-11-02",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/database-management-system/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/database-management-system/",
      "json": "https://aiwiki.page/zh/database-management-system.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "A database management system (DBMS) is software that defines, creates, accesses, updates, and administers a database. It mediates between stored data and the applications or people that use it, providing a controlled environment for representing information, executing queries, enforcing rules, and preserving data through failures. A database is the organized collection of data; the DBMS is the software responsible for managing that collection. In everyday usage, a product described as a “database” often includes both.\n\nThe distinguishing purpose of a DBMS is not simply to store bytes. File systems and application-specific files also do that. A DBMS supplies shared abstractions and services: named collections, data types, query operations, access permissions, integrity constraints, transaction processing, and mechanisms for concurrent use and recovery. Different systems provide different combinations and strengths of these services, ranging from a small library embedded in a mobile application to a distributed service operating across many machines.\n\nDatabase management systems underpin banking, commerce, scientific research, communications, government records, and digital services. Their design connects data modeling and query languages with storage engineering, operating systems, distributed computing, and information security. Understanding a DBMS therefore requires distinguishing its logical representation of information from its physical implementation, as well as examining the guarantees it offers under ordinary operation, overload, and failure."
    },
    {
      "heading": "Historical development",
      "text": "Early business computing commonly stored records in application-specific files. Programs encoded details such as record layouts, field positions, and access paths. Changing a file structure could require changes to every program that used it, while sharing data among applications introduced duplicated records and inconsistent update procedures. Database management emerged partly to centralize these responsibilities and reduce dependence between application logic and physical storage.\n\nDuring the 1960s, hierarchical and network systems established important database capabilities. IBM’s Information Management System, developed in connection with the Apollo program and first released in 1968, organized records through hierarchical relationships. Charles Bachman’s Integrated Data Store helped establish the network approach, in which records could participate in explicitly defined owner–member relationships. The CODASYL Database Task Group subsequently developed specifications for network database systems. These systems supported substantial production workloads, but application programs generally navigated predefined paths through records.\n\nA major conceptual change came with Edgar F. Codd’s 1970 paper, “A Relational Model of Data for Large Shared Data Banks.” Codd proposed representing information through relations and separating the logical description of data from particular access paths. Instead of instructing a system how to traverse records, users could state what data they wanted. This approach encouraged mathematical analysis of queries, dependencies, and correctness, while giving the implementation greater freedom to select efficient execution methods.\n\nDuring the 1970s, research projects demonstrated practical relational systems. IBM’s System R developed influential techniques for SQL processing, cost-based optimization, and transaction management. The Ingres project at the University of California, Berkeley, explored relational implementation and the QUEL query language. Commercial relational products expanded in the late 1970s and 1980s; Oracle Database was among the early commercial SQL systems. SQL became an ANSI standard in 1986 and an ISO standard in 1987, although implementations retained substantial differences.\n\nSubsequent development diversified rather than simply replacing older approaches. Object-oriented and object-relational systems addressed complex application objects; data warehouses specialized in large analytical queries; and Internet services stimulated distributed key–value, document, and wide-column systems. The label NoSQL became prominent in the late 2000s, covering several nonrelational approaches rather than one unified architecture. NewSQL systems later combined relational interfaces and transaction guarantees with distributed execution. Managed cloud services, embedded analytical engines, and systems supporting multiple data models further blurred boundaries between formerly distinct product categories."
    },
    {
      "heading": "Data models and system families",
      "text": "A data model specifies the structures used to represent information, the operations available on those structures, and often the constraints that valid data must satisfy. It is distinct from a storage format: two systems can expose the same relational model while organizing bytes very differently. Conversely, one storage engine can support several logical interfaces. Classifying a DBMS by its data model is useful, but does not by itself establish its performance, durability, or consistency guarantees.\n\nA relational database represents information as relations, commonly exposed as tables with named columns and rows. Relationships are expressed through values rather than through application-visible storage pointers. Relational operations include selection, projection, and joins. Practical SQL systems extend the mathematical relational model with features such as duplicate rows, null markers, ordered query results, and specialized types. A relational DBMS can support text, spatial objects, or structured documents without ceasing to be relational.\n\nA key–value database associates a key with a value and normally emphasizes efficient access by key. The value may be opaque to the system or may support structured operations. Redis, for example, exposes several data structures rather than only uninterpreted byte strings. A document database manages structured documents, often using representations related to JSON, and can index or query fields within them. Flexible document structure reduces the requirement that every record have identical fields, but does not eliminate the need for application-level rules about meaning and compatibility.\n\nOther models emphasize different relationships or access patterns. A graph database represents entities and connections as nodes and edges, often with properties, and supports traversal or graph-pattern queries. A wide-column system organizes data around partition keys and grouped or ordered columns; this differs from the column-oriented physical storage used by analytical relational engines. Hierarchical and network databases remain significant in some established environments. Object databases preserve application objects and their relationships more directly, while time-series systems specialize in timestamped measurements and related operations.\n\nThese categories overlap. A multimodel product may offer document, graph, and relational features, while a nominally relational system may provide native arrays and document indexes. Deployment is another independent dimension: a DBMS may be embedded, client–server, distributed, or provided as a managed service. Likewise, “in-memory” describes the role of memory, not necessarily the absence of persistence. A meaningful comparison therefore examines the actual data structures, query operations, transactional boundaries, failure behavior, and workload assumptions of a system rather than relying on its category alone."
    },
    {
      "heading": "Architecture and data independence",
      "text": "A DBMS normally contains several cooperating subsystems. A connection or session layer receives requests and establishes execution context. Language-processing components parse and validate statements. A planner chooses execution strategies, and an executor performs operations using storage and indexing services. Transaction, recovery, authorization, and metadata components coordinate behavior across these layers. Product boundaries differ: some systems place most functionality in one process, while others divide it among independent services.\n\nA traditional account distinguishes external, conceptual, and internal schemas. External schemas describe particular users’ or applications’ views. The conceptual schema describes the logical organization of the database as a whole. The internal schema describes physical representation, including files, pages, indexes, and placement. This three-schema architecture is an abstraction rather than a mandatory implementation blueprint, but it clarifies why database systems separate the meaning of data from its storage arrangements.\n\nData independence is the ability to change one level without requiring corresponding changes at another. Physical data independence allows an administrator to add an index or reorganize storage while preserving an application’s logical queries. Logical data independence concerns changes to the conceptual organization while maintaining compatible external views. The latter is generally harder: splitting one table into several can alter update semantics even if a view preserves an older read interface. Independence is therefore a design goal with practical limits, not an assurance that all changes are invisible.\n\nThe system catalog records metadata such as table definitions, column types, indexes, constraints, privileges, and optimizer statistics. This metadata is itself data requiring transactional management. A query cannot be interpreted correctly without knowing which objects and types its names designate. Catalog changes also interact with cached execution plans and concurrent sessions. Some systems expose much of the catalog through ordinary tables or standardized information-schema views, although modifying internal catalog storage directly is usually distinct from supported administrative operations.\n\nDeployment architecture determines how these components communicate. An embedded DBMS executes within an application’s process and is invoked through library calls; SQLite is a prominent example. A client–server system receives requests over local or network connections and manages multiple independent clients. Distributed systems may separate query coordination, storage, logging, and metadata management across machines. These choices affect isolation between applications, network latency, operational complexity, and failure boundaries. An embedded database can provide sophisticated transactions, while a large distributed service can still expose a simple key-based interface: process topology and logical capability are separate properties."
    },
    {
      "heading": "Schema design and integrity constraints",
      "text": "A database schema translates a domain into structures that software can store and manipulate. Conceptual design often begins with entities, relationships, identifiers, and business rules. The entity–relationship model, introduced by Peter Chen in 1976, provides a widely used notation for this work. Mapping the conceptual model to a relational schema requires decisions about tables, keys, optional values, relationship cardinalities, and the representation of time and change.\n\nKeys identify records and connect related tables. A candidate key is a minimal set of attributes that uniquely identifies a row; a primary key is a selected candidate key. A foreign key requires designated values to match an eligible referenced key, subject to the system’s null and constraint rules. For example, an order’s customer identifier can reference a customer table, preventing an order from naming a nonexistent customer. Whether deletion is rejected, cascaded, or translated into another action depends on the declared relationship.\n\nNormalization analyzes schemas to reduce particular forms of redundancy and update anomaly. A functional dependency \\(X \\rightarrow Y\\) states that rows agreeing on attributes \\(X\\) must agree on attributes \\(Y\\). If a department’s address is repeated in every employee row, changing the address requires coordinated updates and may produce inconsistent copies. Decomposing department and employee information can eliminate that redundancy. Normal forms, including third normal form and Boyce–Codd normal form, state precise conditions on dependencies; lossless decomposition ensures that joining decomposed relations can reconstruct the original information.\n\nNormalization is not a universal instruction to maximize the number of tables. Some dependencies require more advanced analysis, and some workloads benefit from deliberately maintained redundant data. Denormalization can reduce joins or precompute frequently needed values, but creates additional obligations to keep copies synchronized. A materialized summary of daily sales, for example, must account for late arrivals, corrections, and deletions. The relevant question is which component enforces consistency and under what transaction or refresh policy.\n\nIntegrity constraints include uniqueness, non-null requirements, referential constraints, and checks over permitted values. Their scope matters: a row-level check does not automatically enforce a rule involving arbitrary other rows. Triggers and stored routines can express additional behavior, but their interaction with concurrency requires care. Data types also encode important distinctions: exact decimal arithmetic is often appropriate for monetary quantities, while floating-point types serve approximate numerical computation. Temporal modeling must distinguish dates, instants, local times, and time-zone rules. Schema evolution adds another dimension, because old and new application versions may need to coexist while columns, constraints, and representations change."
    },
    {
      "heading": "Query languages and application interfaces",
      "text": "SQL is the principal standardized language of relational database management. It includes facilities for defining schemas, retrieving and modifying data, controlling privileges, and delimiting transactions. A query such as SELECT customer_id, SUM(amount) FROM orders GROUP BY customer_id describes a result rather than prescribing a particular file traversal. This declarative character allows the DBMS to choose among alternative physical plans while preserving the statement’s defined meaning.\n\nThe logical interpretation of SQL differs in important ways from informal table manipulation. Query results ordinarily retain duplicates unless an operation removes them. Null represents missing or otherwise unspecified information and introduces three-valued logic: a comparison can evaluate to unknown rather than true or false. A filtering condition retains rows for which the predicate is true, not those for which it is unknown. Results also have no guaranteed presentation order without an appropriate ordering clause. These rules affect aggregation, uniqueness, outer joins, and application assumptions.\n\nApplications commonly access a DBMS through drivers and an application programming interface, such as JDBC or ODBC, or through a product-specific protocol. Sessions may carry transaction state, authentication context, temporary objects, and configuration settings. Prepared statements separate a statement’s structure from bound parameter values, potentially reducing repeated parsing and preventing supplied values from being interpreted as SQL syntax. Preparation does not universally imply that one execution plan is reused forever; planning policies vary by system and statement.\n\nServer-side programming places procedural logic near the data. Examples include PL/SQL, Transact-SQL, and PL/pgSQL. Stored procedures can group operations behind a controlled interface, while triggers execute in response to specified events. This can reduce communication round trips and centralize rules, but also introduces dependencies among application code, database privileges, and deployment procedures. Object–relational mapping libraries provide another layer by translating between application objects and database operations; they do not remove the underlying cost of joins, repeated requests, or transaction boundaries.\n\nNonrelational systems may expose document filters, graph languages, key commands, or HTTP-based interfaces. Some combine a SQL-like language with a nonrelational execution model. Query language and guarantee are independent: accepting SQL does not by itself establish support for multi-statement transactions, foreign keys, or a particular isolation level. Distributed clients must also handle ambiguous outcomes. If a connection fails after a commit request, the client may not know whether the server committed. Repeating the request can therefore require an idempotency key or an application-level reconciliation process rather than an unconditional retry."
    },
    {
      "heading": "Physical storage and access methods",
      "text": "A DBMS maps logical records onto physical storage units. Many systems organize persistent data into fixed-size pages, with page headers, record slots, and information about free space. A buffer manager caches pages in memory and coordinates reads and writes with underlying storage. The exact page size and record format are implementation choices. Large values may be stored separately from ordinary records, and compression can operate on individual values, pages, or larger groups.\n\nRow-oriented storage places the fields of a record close together, making it well suited to retrieving or updating individual entities. Column-oriented storage groups values from the same column, reducing the amount read by analytical queries that use only a few columns from wide tables. Columns also often compress effectively because neighboring values have similar types and distributions. These are physical arrangements rather than mutually exclusive logical models: both can represent relational tables, and some engines maintain different representations for different workloads.\n\nA database index is an auxiliary structure that accelerates access without requiring a full scan of the underlying data. B-tree variants are widely used for equality and range lookups because their high branching factors keep trees shallow. With \\(N\\) indexed entries and effective fan-out \\(B\\), the tree height grows approximately as \\(O(\\log_B N)\\). Hash indexes are particularly suited to equality matching, while spatial, inverted, and specialized indexes support other predicates. Index maintenance consumes space and adds work to inserts, updates, and deletes.\n\nA log-structured merge tree organizes updates through memory-resident structures and immutable sorted files. New writes are buffered and later flushed; background compaction combines files and discards obsolete versions when permitted. This can make ingestion efficient, but introduces trade-offs among write amplification, read amplification, and space amplification. Bloom filters can help avoid probing files that do not contain a requested key, although a positive filter result still requires verification.\n\nStorage design depends on hardware and durability requirements. Solid-state drives remove mechanical seek costs but retain meaningful differences between random access, sequential access, and sustained writes. Compression saves storage and input/output bandwidth at the expense of processor work. Buffer replacement, prefetching, and write scheduling influence observed latency. Memory hierarchy effects also matter after data is cached: cache misses, pointer-heavy structures, and synchronization can dominate execution. Consequently, an “in-memory” workload is not necessarily free of storage-engine bottlenecks, and an index that reduces disk reads may still lose to a sequential scan when a query selects a large fraction of a table."
    },
    {
      "heading": "Query optimization and execution",
      "text": "A query optimizer translates a declarative request into an executable plan. Parsing first establishes syntactic structure, while binding resolves names, functions, and types. Rewriting can simplify expressions, expand views, remove redundant operations, or transform subqueries. The optimizer then considers alternative access paths and operator arrangements. The executor implements the selected plan through operations such as scans, filters, joins, sorting, aggregation, and data modification.\n\nQuery optimization commonly uses estimated costs rather than executing every candidate. Estimates incorporate cardinalities, value distributions, row widths, available memory, storage behavior, and sometimes network communication. Histograms, counts of distinct values, and sampled statistics help predict selectivity. These predictions can fail when columns are correlated, parameters are unusual, or data has changed substantially. Underestimating an intermediate result can cause an unsuitable join choice or insufficient memory allocation, leading to disk spills and unexpectedly long runtimes.\n\nJoins illustrate the importance of physical alternatives. A nested-loop join examines matches for each outer row and can be efficient when the outer input is small and the inner side has a suitable index. A hash join builds a hash structure on one input and probes it with the other, often performing well for large equality joins. A sort–merge join processes ordered inputs and can exploit existing order. The best method depends on cardinality, ordering, predicate type, and memory, not simply on table size in isolation.\n\nJoin order can change the size of intermediate results by orders of magnitude. Cost-based optimizers use search procedures, including dynamic-programming techniques associated with the System R tradition, but exhaustive search becomes expensive as the number of relations grows. Systems therefore restrict the search space or apply heuristics. Transformations such as predicate pushdown reduce data early, while partition pruning excludes storage regions known to be irrelevant. Rewriting must preserve semantics: pushing a condition through an outer join, for example, can alter which unmatched rows survive.\n\nExecution models have also evolved. Tuple-at-a-time iterators provide modularity, while vectorized execution processes batches to reduce per-row overhead and improve processor efficiency. Some engines compile expressions or larger pipelines into machine code. Parallel computing permits multiple workers to scan, join, or aggregate portions of a dataset, but introduces coordination and redistribution costs. An execution plan is therefore both a logical arrangement of operations and a schedule for using resources. Plan inspection tools reveal chosen operators and, when instrumented execution is requested, actual row counts and timings; the gap between estimates and observations is often central to understanding performance."
    },
    {
      "heading": "Transactions, isolation, and concurrency control",
      "text": "A transaction groups operations into a unit with defined completion semantics. The familiar ACID properties are atomicity, consistency, isolation, and durability. Atomicity means that a transaction’s effects are applied as a unit rather than left partially completed. Consistency concerns preservation of declared invariants by valid transactions. Isolation governs interference among concurrent transactions. Durability concerns preservation of acknowledged committed results under the failures covered by the system’s configuration and design.\n\nThese properties require careful interpretation. A DBMS cannot infer every rule of an application merely because it supports ACID transactions. If a transfer routine deducts money without issuing the matching credit, atomic execution alone does not make the routine correct. Likewise, durability depends on what the system treats as a successful commit and which failures it is designed to survive. Transactional guarantees describe the behavior of specified operations under specified conditions, not immunity to all software errors or disasters.\n\nConcurrency control allows multiple transactions to operate without violating the selected isolation semantics. Lock-based methods prevent incompatible operations from proceeding simultaneously. Two-phase locking separates lock acquisition from release in a way that can ensure serializability; strict variants retain relevant locks until transaction completion. Locks may cover rows, pages, tables, or ranges. Waiting transactions can form a deadlock cycle, requiring detection or prevention and usually the abort of one participant.\n\nMultiversion concurrency control maintains different versions of records so that readers can access a suitable snapshot while writes proceed. Visibility rules determine which versions a transaction may observe. Old versions eventually require reclamation, but long-running readers can delay that process. Multiversioning is not itself an isolation level: it can implement several different semantics, and systems with superficially similar snapshots may differ in their treatment of concurrent writes and predicate reads.\n\nSerializable execution requires committed outcomes equivalent to some serial ordering of the transactions. Weaker isolation levels permit additional histories in exchange for reduced coordination or abort rates. Snapshot isolation prevents many read anomalies but can permit write skew: two transactions read the same condition and update different records, jointly violating an invariant that neither update violates alone. Preventing this may require stronger isolation, explicit locking, or a different representation of the constraint. Optimistic methods instead execute speculatively and validate before commit. Aborts are therefore a normal concurrency-control outcome, and correct applications must distinguish safe retries from operations whose external effects have already occurred."
    },
    {
      "heading": "Logging, recovery, and backup",
      "text": "Recovery mechanisms address failures that interrupt processing or damage stored data. These include process crashes, operating-system failures, power loss, storage faults, and broader site failures. Different mechanisms cover different cases. Restart recovery may restore a consistent state after a crash without protecting against deletion of the entire storage volume. A backup may protect against lost files while still requiring logs to recover recent committed changes.\n\nWrite-ahead logging records information needed for recovery before corresponding database pages are allowed to reach persistent storage. In a common design, log records describing an update must be durable before the affected data page is written. A commit record must reach the durability boundary required by the configured guarantee before success is acknowledged. This ordering allows the database to write modified pages at convenient times rather than forcing every page touched by a transaction to storage at commit.\n\nRecovery may need to redo changes that were committed but not fully written to data files, and undo changes from incomplete transactions that reached storage. The exact requirements depend on buffer-management policies and storage architecture. The ARIES recovery method, published in 1992 by C. Mohan and colleagues, is an influential design organized around analysis, redo, and undo. Its use of log sequence numbers and compensation log records supports recovery in the presence of interrupted rollback and repeated failures.\n\nCheckpoints limit how much history restart recovery must examine. They do not necessarily create a completely frozen or fully flushed database image; implementations often take fuzzy checkpoints while transactions continue. Logging also supports point-in-time recovery when combined with an appropriate base backup and an unbroken sequence of subsequent log records. A recovery target might precede an accidental bulk deletion, allowing a separate restored instance to reconstruct the earlier state.\n\nDatabase backup must capture a recoverable database state, not merely copy arbitrary files while they change. Physical backups preserve storage-level representations, whereas logical exports reconstruct objects and data through higher-level interfaces. Each has different portability, restoration, and completeness properties. Recovery objectives distinguish acceptable data loss from acceptable restoration delay, commonly expressed as recovery point objective and recovery time objective. Replication is not a substitute for backup: an erroneous deletion can be copied promptly to every replica. Similarly, a backup’s existence does not establish restorability unless its data, logs, keys, metadata, and restoration process are sufficient to recreate a usable system."
    },
    {
      "heading": "Distribution, replication, and consistency",
      "text": "A distributed DBMS coordinates data and computation across machines. Distribution can increase capacity, place data near users, isolate failures, or satisfy placement requirements, but introduces network communication and partial failure. One machine can remain healthy while another becomes unreachable, and a delayed response does not prove whether an operation executed. These conditions make distributed coordination fundamentally different from ordinary procedure calls within one process.\n\nSharding partitions a logical dataset among independently managed storage units. Hash partitioning can spread keys relatively evenly, while range partitioning supports ordered scans and locality. Partitioning by tenant or geographic region can align placement with application boundaries. The choice affects routing, joins, uniqueness constraints, and cross-partition transactions. Skewed keys create hot spots, and changing partition boundaries requires moving data while preserving correct access and update behavior.\n\nReplication maintains multiple copies of data. A leader-based design directs writes through a designated leader and propagates changes to followers. Synchronous replication can require confirmation from other replicas before acknowledging a write; asynchronous replication permits followers to lag. Multi-leader and leaderless designs distribute write acceptance differently and must address conflicting or concurrent updates. Replica count alone does not determine consistency or durability: placement, acknowledgment rules, failover procedures, and failure assumptions are equally important.\n\nConsensus algorithms, including Paxos and Raft, allow replicas to agree on ordered decisions despite specified failures. Their guarantees depend on assumptions such as nonmalicious failures and sufficient communication among participants. Consensus within one replication group does not automatically provide atomic transactions across several groups. Two-phase commit addresses distributed commit by asking participants to prepare and then communicating a commit or abort decision; in its basic form, some failures can leave prepared participants waiting for the decision. Practical systems combine commitment, replication, recovery, and timeout mechanisms.\n\nThe CAP theorem formalizes a limitation involving consistency, availability, and network partitions in a particular distributed model. During a partition, a system cannot guarantee both linearizable behavior and availability as defined by the theorem. This is not a general instruction to “choose any two” properties for every operating condition. Other distinctions remain essential: serializability concerns transaction histories, linearizability concerns real-time ordering of operations, and eventual consistency concerns convergence under specified conditions. A system can expose different guarantees for different operations. Session properties such as read-your-writes may improve application behavior without making every read globally current."
    },
    {
      "heading": "Analytical and specialized workloads",
      "text": "Database workloads differ in their access patterns and objectives. Online transaction processing typically involves many short operations over small portions of current data: creating an order, reserving inventory, or recording a payment. Online analytical processing involves larger scans, joins, and aggregations used to investigate patterns or compute reports. The distinction is not absolute, but the competing demands help explain why one storage layout or scheduling policy rarely serves every workload equally well.\n\nA data warehouse integrates information for analysis, often retaining historical records and organizing data around business subjects. Dimensional schemas commonly separate fact tables containing events or measurements from dimension tables describing customers, products, or time. Data reaches the warehouse through extraction, transformation, and loading pipelines, or through related arrangements that load data before transformation. Correct analysis depends not only on query speed but also on how duplicates, late events, changing dimensions, and source-system corrections are represented.\n\nAnalytical engines commonly combine columnar storage, compression, vectorized execution, and parallel processing. Materialized views or aggregate tables precompute useful results, exchanging storage and maintenance work for lower query latency. DuckDB illustrates an embedded analytical DBMS: analytical execution need not require a separate server or large cluster. Hybrid transactional and analytical processing seeks to support both styles, often through separate representations, replicas, or resource controls so that long scans do not overwhelm latency-sensitive transactions.\n\nSpecialized systems optimize additional structures and operations. Time-series databases can organize measurements by timestamp and series identifier, with retention and downsampling facilities. Spatial databases represent geometries and evaluate relationships such as intersection or containment, taking coordinate systems into account. Text-search capabilities use structures such as inverted indexes to support information retrieval. Streaming systems maintain results over continuing event flows, where event time, arrival time, out-of-order data, and finite windows determine the meaning of a result.\n\nVector search adds another workload: retrieving stored vectors near a query vector under a similarity measure. It supports applications in machine learning and retrieval-augmented generation, among others. Exact nearest-neighbor search can be costly at scale, so many implementations use approximate indexes with tunable trade-offs between recall, latency, and memory. A vector index does not replace metadata filtering, permissions, or transaction management. Whether such features are integrated into a general-purpose DBMS or delivered by a specialized service, their behavior must be evaluated as part of the complete query and update pipeline."
    },
    {
      "heading": "Security, access control, and privacy",
      "text": "Database security protects confidentiality, integrity, and availability across stored data, queries, administrative operations, and supporting infrastructure. Authentication establishes the identity or credentials associated with a connection. Authorization determines which operations that identity may perform. These are separate functions: a successfully authenticated user need not have permission to read a particular table, execute a privileged routine, or alter a schema.\n\nRole-based access control groups privileges so that administrators can assign capabilities through roles rather than maintain every permission individually. Systems may distinguish object ownership, the right to delegate privileges, and permission to perform administrative actions. Views can expose selected columns or filtered rows, while row-level policies apply conditions within query processing. Such mechanisms require attention to execution context: a stored routine may run with its caller’s privileges or with a defining owner’s privileges, producing substantially different security boundaries.\n\nSQL injection occurs when untrusted input is interpreted as part of a command rather than as a data value. Parameter binding addresses this distinction for values, but dynamic identifiers and generated syntax still require controlled construction. Security also depends on software outside the DBMS, including applications, connection pools, secrets management, and administrative tools. An unrestricted application account can expose much more data than the application’s ordinary interface intends, even if its queries are free of injection vulnerabilities.\n\nEncryption protects data under particular access assumptions. Transport Layer Security can protect client–server traffic against interception and modification. Encryption at rest protects stored representations when the relevant keys remain unavailable to an attacker. Neither automatically prevents an authorized database session from reading decrypted data. Key storage, rotation, backup, and recovery are therefore part of the design. Losing the required key can make an otherwise intact backup unusable, while placing unrestricted access to both data and keys in one compromised environment weakens the intended separation.\n\nAudit records document events such as logins, privilege changes, schema modifications, and access to sensitive objects, depending on configuration. Their value depends on completeness, trustworthy timestamps, controlled access, and protection against alteration. Data privacy also concerns purpose, retention, and linkage, not merely access control. Deleting a row from the active database does not immediately remove every copy from backups, logs, replicas, or downstream systems. Masking and pseudonymization can reduce exposure in some settings, but do not necessarily prevent reidentification. Security claims must therefore identify the protected assets, permitted users, adversary capabilities, and boundaries of the mechanisms involved."
    },
    {
      "heading": "Administration, reliability, and performance engineering",
      "text": "Operating a DBMS involves maintaining predictable behavior as workloads, data volumes, schemas, and infrastructure change. Administration includes provisioning, access management, backup, replication, patching, capacity planning, and incident analysis. Managed services transfer some of these duties to a provider, but application owners still determine schemas, queries, data quality rules, and many configuration choices. The division of responsibility varies across offerings and should not be inferred from the word “managed.”\n\nPerformance has several dimensions. Throughput measures completed work per unit time, while latency measures the duration of individual operations. Tail latency describes slower portions of the latency distribution and can matter more than an average for interactive services. Increasing concurrency does not guarantee higher throughput: once a bottleneck saturates, additional requests can create longer queues, greater contention, and more timeouts. Connection pools and workload admission controls limit simultaneous work, but their settings must correspond to the actual resources and transaction behavior.\n\nUseful observations include query counts, execution times, lock waits, cache behavior, storage latency, replication lag, log generation, and available capacity. A high cache hit rate alone does not establish good performance, because queries may still scan excessive cached data or consume too much processor time. Similarly, low average processor utilization can coexist with poor latency caused by storage waits, a single hot lock, or an overloaded coordinator. Diagnosis depends on relating measurements to execution plans and application request patterns.\n\nSchema and software changes introduce operational risks. Building an index may require additional storage and generate substantial log traffic. Adding a constraint can require validation of existing data. A change described as “online” may still acquire brief blocking locks or reduce throughput. Replication and upgrade procedures must also account for format compatibility, extension behavior, client protocols, and the possibility that old and new application versions overlap. Long-running transactions can delay cleanup, retain log history, or obstruct schema changes even when they perform little active work.\n\nEvaluation requires representative experiments rather than isolated headline numbers. Transaction and analytical benchmarks from the Transaction Processing Performance Council illustrate standardized workload definitions, but published results depend on scale, configuration, pricing rules, and benchmark version. Application-specific tests must include relevant data distributions, concurrency, durability settings, and maintenance activity. Failure testing examines a different dimension from steady-state speed: failover time, acknowledged-write preservation, restoration behavior, and client recovery may determine suitability even when normal-operation performance is excellent. These properties emerge from the combined behavior of the DBMS, storage, network, operating procedures, and application transaction design."
    }
  ],
  "links": [
    "database",
    "operating-system",
    "distributed-computing",
    "relational-database",
    "key-value-database",
    "redis",
    "database-normalization",
    "denormalization",
    "sql",
    "application-programming-interface",
    "database-index",
    "log-structured-merge-tree",
    "memory-hierarchy",
    "parallel-computing",
    "database-transaction",
    "acid-properties",
    "write-ahead-logging",
    "database-sharding",
    "database-replication",
    "cap-theorem",
    "data-warehouse",
    "duckdb",
    "information-retrieval",
    "machine-learning",
    "retrieval-augmented-generation",
    "authentication",
    "encryption",
    "transport-layer-security",
    "data-privacy"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}