Use it as the entry point for database questions: connectivity, queries, performance, backup or replication.
Database Fundamentals
A database stores structured data and serves it to applications through queries, guaranteeing consistency with transactions. Relational databases (PostgreSQL, MariaDB/MySQL, SQL Server) use tables, keys and SQL.
1. Engine and version: SELECT version(); (PG) / SELECT VERSION(); (MySQL) / SELECT @@VERSION (MSSQL).
2. Can the app connect? host, port, credentials.
3. Slow or failing query → plan and locks.
4. Server resources: CPU, memory, disk, connections.
5. Backups recent and tested?
application → connection (network, auth) → SQL → planner → storage engine → result
Typical mistakes are mixing server/instance/database terminology, assuming ACID eliminates application-level race conditions, treating TCP reachability as a successful database session, or blaming storage before checking locks, sessions and engine state. Preserve the first divergent observation and repeat the same bounded verification after remediation.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Databases owns engine and data-model behavior. Linux/Windows own the host; Storage owns filesystems/block durability; application code/ORM behavior is outside this infrastructure-focused Domain.
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification workflow Verify boundary
Identify the engine/product, server/instance, database and schema before running administrative commands. Verify connectivity, session context and a bounded read/write transaction, then distinguish engine health from a particular database, query or application connection pool.
Step 2 Failure signatures and limits Narrow the fault
Typical mistakes are mixing server/instance/database terminology, assuming ACID eliminates application-level race conditions, treating TCP reachability as a successful database session, or blaming storage before checking locks, sessions and engine state.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Subtopics
Go one level deeper into this subject.
ACID describes the guarantees a transactional database gives: atomicity, consistency, isolation and durability.
Subtopic Relational Model and NormalizationThe relational model stores data in tables of rows and columns linked by keys; normalization removes duplicated data so each fact is stored once.
Subtopic Database Connections and PoolingEach client connection uses server memory and a process or thread; connection pools reuse a small number of connections for many application requests.
Separate the layers: network and authentication, the SQL itself, locks/transactions, server resources, and storage. Always know which engine and version you are on — syntax and tools differ.
SELECT version();— first check for this topicpsql -c "SELECT now(), version();"— PostgreSQL reachable and versionmysql -e "SELECT NOW(), VERSION();"— MariaDB/MySQL reachable and versionsqlcmd -S <server> -Q "SELECT @@VERSION"— SQL Server reachable and version
ReferenceWhat it is1 section · depth on demand
Operating model
Database Fundamentals defines the operational model for relational database systems: a database engine accepts sessions, executes transactions against structured data, maintains durability/consistency state and exposes administrative boundaries such as instances, databases, schemas, tables and users. Exact terminology differs by product, so identity and scope must be explicit.
ReferenceHow it works1 section · depth on demand
In depth
A relational database stores data in tables of rows and columns, linked by keys, and lets applications query and change it with SQL while guaranteeing consistency through transactions. Understanding a few core concepts explains most database behaviour that operations teams meet.
| Concept | Meaning |
|---|---|
| Table, row, column | Structured data with defined types |
| Primary key | Unique identifier for each row |
| Foreign key | Reference to a row in another table |
| Index | Structure that speeds up lookups |
| Transaction | Group of changes that succeed or fail together |
| ACID | Atomicity, consistency, isolation, durability |
| Write-ahead log (WAL / redo / transaction log) | Durability and recovery, replication source |
| Engine | Typical use |
|---|---|
| PostgreSQL | General purpose, extensions, strong standards support |
| MariaDB / MySQL | Web applications, LAMP stacks |
| Microsoft SQL Server | Windows/.NET enterprise applications |
| SQLite | Embedded, single-file databases |
For operations, the key responsibilities are backups that can be restored, performance monitoring, security and controlled schema changes.
ReferenceImportant terms & boundaries1 section · depth on demand
Scope map
- Relational model
- Server → instance → database → schema → table boundaries
- Rows, columns and keys
- ACID
- Connections and sessions
- Client/server request lifecycle
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Configuration & expected output
Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.
Configuration example
Assumptions: Client tools installed; credentials supplied through a password file or prompt, not on the command line.
psql "host=db1 dbname=app user=app_ro" -c "SELECT version(), current_database(), current_user;"
mariadb -h db1 -u app_ro -p app -e "SELECT VERSION(), DATABASE(), CURRENT_USER();"Expected output
psql -h db1 -U app_ro -d app -c "SELECT current_database(), current_user;"Expected state: The session is connected to the intended database as the intended role.
current_database | current_user
------------------+--------------
app | app_ro
(1 row)Always confirm database and role before running changes; many incidents are a correct statement run against the wrong server. Illustrative authored output: field layout matches the tool, values will differ in your environment.Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Documentation verification: confirms the upstream model used by the Topic. It does not assert local production behavior.
Basis: https://www.postgresql.org/docs/current/tutorial-concepts.html · confidence 92%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Database Fundamentals verification boundary matrix
A compact lookup separating intent, owning component state, effective state and consumer-visible outcome for Database Fundamentals.
| Boundary | Inspect | Healthy interpretation | Do not infer |
|---|---|---|---|
| Intent | Relational model | Intended object/scope is explicit and versioned where relevant | Intent is already effective |
| Owning runtime/control plane | Server → instance → database → schema → table boundaries / Rows, columns and keys | Owner accepts and reports the expected object state | Downstream dependencies are healthy |
| Effective state | ACID | Independent read-back matches the intended state | Every client sees the same result |
| Consumer outcome | Connections and sessions | The original bounded check succeeds in the same time window | Production correctness outside this scope |
Deep reference
Design & tradeoffs
Scope
Databases owns engine and data-model behavior. Linux/Windows own the host; Storage owns filesystems/block durability; application code/ORM behavior is outside this infrastructure-focused Domain.