Database

From Wikipedia, a free encyclopedia written in simple English for easy reading.

A Database is a program for a computer. It is used to store data. There are different kinds of databases. The most common ones are called relational databases. They store relations of things. For this they use database tables. A very simple example of a database would be an electronic address book.

[edit] Database model

There are different ways how to represent the data.

  • Simple files (called flat files): Simply write the data into a number of big files.
  • Hierarchical model: The data is organised like a tree structure. The interesting data is at the leaves of the tree
  • Network model: Use records and sets to store the data
  • Relational model: This uses set theory and predicate logic. It is very widely used. Data looks like it is organised in database tables. These tables can then be joined together, or simple fields can be chosen from them.
  • Object relational model: This uses the same data types for the database, as for the (object-oriented) application.

[edit] Things a database should be able to do

Any database should be able to do the following (known as ACID

  • Atomicity. Either all tasks of a given set (called transaction) are done, or none of them is.
  • Consistency. The data in the database always makes sense. There is no half-done (invalid) data
  • Isolation. If many people work on the same data, they will not see (or impact) each other. Each of them has their own view of the database, which is independent of the others
  • Durability. Transactions must be 'committed, when they are done. Once the commit has been done, they can no longer be undone.