> For the complete documentation index, see [llms.txt](https://serciiit.gitbook.io/introduction-to-software-systems/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://serciiit.gitbook.io/introduction-to-software-systems/databases/database-systems.md).

# Database Systems

A database (DB) is a collection of data that lives for a long time. Many systems fit this definition, for example, a paper-based file system, a notebook, or even a string with knobs for counting.&#x20;

A Database Management System (DBMS) is a system (software) that provides an interface to the database for information storage and retrieval. We are more interested in software systems rather than manual systems because they can do the job more efficiently. The common features of a DBMS include

* capacity for a large amount of data
* an easy to use interface language (SQL-structured query language)
* efficient retrieval mechanisms
* multi-user support
* security management
* concurrency and transaction control
* persistent storage with backup and recovery for reliability

The users of a database assume different roles such as

* end-user - application programmers that use the DB as a storage subsystem
* designer - application programmers and/or business analysts who design the layout of the DB
* administrator - operators who maintain the health and efficiency of the DB
* implementor - programmers who maintain and develop the DBMS

The key concepts of the database include

* schema - the structure and the constraints of data
* data - the actual content of the DB representing information
* data definition language - used to specify the schema
* data manipulation and query language - used to change the data and query them

Schema is a meta-data that describe data. Such meta-data can describe the structure of the data which ranges from strictly enforced structure (relational) to semi-structured (XML) and free-structured data (text files). Before we define the schema we must decide on a model of the data - a metaphor. For relational database n-ary relation is used to model data.

### ACID Properties &#x20;

A transaction is a collection of instructions. To maintain the integrity of a database, all transactions must obey ACID properties. **ACID** is an acronym for *atomicity*, *consistency*, *isolation*, and *durability*. Let’s go over each of these properties.

**Atomicity** - A transaction is an atomic unit; hence, all the instructions within a transaction will successfully execute, or none of them will execute.

**Consistency** - A database is initially in a consistent state, and it should remain consistent after every transaction.&#x20;

**Isolation** - If the multiple transactions are running concurrently, they should not be affected by each other; i.e., the result should be the same as the result obtained if the transactions were running sequentially.

**Durability** - Changes that have been committed to the database should remain even in the case of software and system failure.

### Interesting Reading List

* <http://philip.greenspun.com/sql/index.html>&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://serciiit.gitbook.io/introduction-to-software-systems/databases/database-systems.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
