Thursday, 12 June 2014

Databases

A database is a store of data that is

Persistent - held in a form of permanent medium such as disk or flash memory
Related - not just a random collection of facts
Organised - stored in a structured, predictable way

Called a series database because the items are in order.

A serial file database: items stored one after the other
Sequential file database : organised in some sort of order

External view - what the user sees, designed to be useful for a particular job
Conceptual view - to do with how the data is organised, the design of the tables and how they are linked.
Physical view - How the data is stored on the storage medium. Designers and users don't bother with it, it's handled by the database software.

Flat file - single table such as a spread sheet, only good for simple data handling.
Hierarchical - database items relate to each other in branches.

The DBMS must:
-Allow data sharing
-Allow multiple user access
-Allow multiple applications to work on them
-Hold just one copy of data that everything can access, this prevents inconsistent updates
-Make it possible to change the data in a database without having to change the applications

All database transactions must be subject to the ACID test:
Atomic - a change is either completely performed or not at all
Consistent - a transaction must take a database from one consistent state to another
Isolated - a transaction must not be visible to any other transaction or user until it is irrevocably committed
Durable - once a change has been made, it must not be lost as consequence of any subsequent failure

No comments:

Post a Comment