Database management system (source code)

= Database management system

A <database management system> is software that defines, stores, <database query>[queries] and updates <database>[databases] while managing access, <data integrity>[integrity] and <concurrent computing>[concurrent use]. Its components can include a <parsing>[query parser], optimizer, storage manager, transaction manager and recovery mechanism. A <database> is the managed collection; the <database management system> supplies the mechanisms and interfaces used to operate on it.

For example, evaluating `SELECT name FROM Person WHERE id = 7` requires interpreting the <database query>[query], choosing an access path, retrieving visible records and returning the selected field. An index can speed the lookup without changing its logical result. <concurrent computing>[Concurrent] updates may require locks or versions, and a crash may require <write-ahead logging>[log replay]. Merely writing records to a <file> does not supply those guarantees. PostgreSQL's tutorial illustrates the distinction between client applications, the server <operating-system process>[process] managing <database> <file>[files] and connections, and the <database>[databases] accessed through that server.<Concepts in the PostgreSQL documentation>[§2.2, client/server architecture and database organization]{ref}