---
description: >-
  This section covers some basic concepts related to Database Systems their
  usage.
---

# 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](http://philip.greenspun.com/sql/index.html)&#x20;
