A database schedule that can be turned into a serial database schedule by swapping adjacent operations of different database transactions that do not conflict. Reads and writes of the same object conflict when at least one is a write.
Database Created 2026-10-31 Updated 2026-11-05
A database is an organized collection of data maintained for queries and updates. A database management system manages that collection, enforcing access rules and database integrity constraints. A relational database represents it through database relations, rather than exposing only an arbitrary collection of bytes in files.
For example, a laboratory can store biological sample identifiers, measurement values and scientific instrument identifiers as database tuples. A database query can select measurements above a threshold and join them to scientific instrument records. A foreign key can require every recorded scientific instrument identifier to name an existing scientific instrument. This makes the connection a maintained rule rather than a convention that every application must remember.
The logical relational schema and actual storage are distinct. A database query plan may use an index or scan database pages while returning the same specified result. Database transactions coordinate related updates, and database integrity constraints restrict the permitted states. PostgreSQL's documentation gives a concrete implementation in which named tables contain rows with named, typed columns and databases group tables.[ref]
Database precedence graph 2026-10-31
A directed graph with a vertex for each database transaction and an edge from the earlier to the later participant in each conflicting pair of operations. A database schedule is a conflict-serializable database schedule exactly when this directed graph has no directed cycle.
Database schedule Created 2026-10-31 Updated 2026-11-05
An ordering of operations of several database transactions that preserves the operation order within each database transaction.
Database transaction Created 2026-10-31 Updated 2026-11-05
A database transaction groups database operations into a unit that can be committed or rolled back. Transaction atomicity means that its updates take effect together or not at all. Transaction durability concerns retaining an acknowledged committed result after a failure; transaction isolation controls which effects concurrent database transactions may observe.[ref]
For example, transferring seven units from an account with balance twenty to one with balance five should produce balances thirteen and twelve. A failure after only the debit must not leave thirteen and five as a completed transfer. In SQL, a transaction block uses BEGIN, then the related updates, then COMMIT; ROLLBACK abandons the uncommitted changes.[ref]
Isolation is a separate question from grouping statements. Two concurrent transfers can each read an old balance before either writes. A correct application must select suitable transaction isolation or locking and handle possible conflicts; merely putting the statements in a database transaction does not establish every desired invariant. The corresponding database schedule records their interleaving.
Database view 2026-11-05
A database view is a named database query that can be used much like a database relation. An ordinary view stores the query definition rather than a separate persistent copy of its result. Referring to the view evaluates that definition as part of the surrounding database query; changes in the underlying data can therefore change the view's result.[ref]
For example, an orders table might contain identifiers, totals and payment flags. The definition CREATE VIEW unpaid_orders AS SELECT id, total FROM orders WHERE paid = false; exposes the unpaid orders without requiring every application query to repeat the condition. If order 17 is marked paid, the next query of the ordinary view no longer includes that order, subject to the query's database transaction snapshot. Creating the view did not create another independent copy of order 17.
A view can hide storage and schema details behind a stable interface, supporting data independence. A materialized view instead stores results that require a refresh policy. Some ordinary views permit updates, but a view containing aggregation or certain joins may not identify a unique underlying row to change. Update behavior and access control are separate specifications; the word view alone does not guarantee that an arbitrary definition is writable or supplies a security boundary.[ref]
Henry F. Korth 2026-11-05
Henry F. Korth studies database management systems, including database transactions and database query processing in parallel and distributed settings. His Lehigh profile records these research areas and work on database storage and aggregation systems.[ref]
With Abraham Silberschatz and S. Sudarshan, he coauthored teaching material on the relational model. A relation is a set of tuples, so mathematical projection removes repeated result tuples; a query language or implementation that retains duplicates has different semantics unless duplicate removal is requested. For example, projecting the department column of two employee records from the same department gives one tuple under set semantics. Keeping this distinction explicit helps connect a declarative query to its actual result.[ref]
Materialized view 2026-11-05
A materialized view stores the result of a defining database query, allowing later queries to read the stored result. An ordinary database view retains the definition and evaluates it against the relevant underlying data when queried. A materialized view trades storage and maintenance work for potentially cheaper repeated reads; its freshness depends on when and how the result is maintained.[ref]
Suppose an orders table contains totals 10 and 20 for one customer. A materialized view defined by SELECT customer_id, SUM(total) AS total FROM orders GROUP BY customer_id stores 30 for that customer. Inserting a third order worth 7 changes the underlying sum to 37. In PostgreSQL, the previously stored 30 remains until a refresh replaces the result, for example with REFRESH MATERIALIZED VIEW customer_totals;. The stored answer can therefore be internally consistent yet out of date.
A dashboard that tolerates nightly updates can benefit from this arrangement, especially when the defining database query combines many rows. An application requiring the latest committed totals needs a suitable maintenance policy and database transaction semantics. The term materialized view alone does not promise automatic updates or an always faster query.[ref]
A serial database schedule is obtained by running the three database transactions in the order :
A genuinely interleaved conflict-serializable database schedule with the same serial order is
The early conflicts with nothing: all accesses to are reads. The conflicts on give edges , and in the database precedence graph, while the writes to give the already present edge . This database precedence graph has no directed cycle and admits the order . Moving the early after swaps it only past non-conflicting operations, recovering the displayed serial database schedule.
For a database schedule that is not a conflict-serializable database schedule, take
On , before forces . On , before forces . The resulting directed cycle prevents any serial ordering from preserving all conflicts. Each of the three displayed database schedules preserves the operation order inside every database transaction.
PostgreSQL 2026-11-05
PostgreSQL is an open-source object-relational database management system supporting SQL, database transactions, constraints and extensible data types. It manages stored relations and concurrent access through a server, rather than merely defining a database query language. The project descends from the Berkeley POSTGRES system.[ref]
For example, SELECT name FROM samples WHERE reading > 5 requests selected rows without prescribing their physical access path. A database index can accelerate retrieval, while database transactions govern the visibility and consistency of related updates. A database relation has no implicit presentation order: a caller needing sorted rows must request an ordering.[ref] These distinctions separate logical results from storage organization and display.
The PostgreSQL Global Development Group is the collective project attribution used for the development and documentation of PostgreSQL, an open-source database management system. Its documentation specifies concrete behavior for database transactions, database integrity constraints, database query operations and storage mechanisms; these specifications are more precise than inferring behavior from SQL syntax alone.[ref]
For example, PostgreSQL documents transaction isolation levels in terms of visible snapshots and permitted anomalies. The project name here identifies the responsible development community, rather than one individual author or a separate database product.
Serial database schedule 2026-10-31
A database schedule in which every database transaction runs as one contiguous group, without interleaving another database transaction.
Transaction atomicity 2026-11-05
Transaction atomicity gives a database transaction an all-or-nothing effect: either its committed updates take effect together or its partial updates do not remain as a completed result. This can be implemented with undo information, version visibility, recovery logging or combinations of these mechanisms. It does not require every physical write to happen at the same instant.
For example, transferring five units between accounts requires a debit and a credit. If an error occurs after the debit, aborting the transaction must not leave only that debit as the final database result. SQL transaction blocks use BEGIN, COMMIT and ROLLBACK to express the boundary.[ref] Atomicity alone does not say how transactions interact before completion; transaction isolation governs that. Nor does it make a committed result survive a crash; that is transaction durability. External effects such as a sent email require coordination beyond rolling back the database changes.
Transaction isolation 2026-11-05
Transaction isolation specifies which effects concurrent database transactions may observe and which interleavings are permitted to commit. Serializable isolation requires the combined result to be equivalent to some serial ordering, even when execution actually overlaps. Weaker levels admit particular anomalies; their names require implementation-specific interpretation.[ref]
For example, two doctors are on call. Each transaction reads that both are available and removes its own doctor, intending to leave someone on call. If each sees an old snapshot and they update different rows, both may commit under a snapshot-based level that does not prevent this write skew. No serial ordering would let both checks pass. PostgreSQL Serializable can reject such conflicting executions, so the application must be prepared to retry a whole transaction. Isolation protects a stated concurrency model; it does not repair a faulty business rule within one transaction.