Thursday 12 June 2014

Databases

A database is a collection of data that complies to three specific rules.
It must be:
Persistent - held permanently in a medium such as a hard drive or flash memory.
Related - not a random assortment of facts or numbers
Organised - stored in a structured way that is easy to read, commonly a table

A serial file database is when the data is stored as a series, one after the other.
If the data is stored in an order it is a 'sequential file' file.

External view - the GUI the user sees
Conceptual view - how the data is organised(e.g. the design of the tables and the link between them)
Physical view - How the data is stored, handled by the database software

Flat file - one single spread sheet, only good for very simple databases
Hierarchical - branches of multiple tables etc. useful for larger data sets but harder to set up

DBMS must: 
Allow data sharing
Aloe multiple access
Allow multiple applications to work with it
Hold one copy of data everyone can access-prevents inconsistent updates
Make it possible to change data in a database without having to change applications

All database transactions must be subject to the ACID test,
Atomic-change completely performed or not at all
Consistent-transaction takes database from one consistent state to another
Isolated-must not be seen by another user until the transaction is irreversibly committed 
Durable-transaction not lost due to system failure

No comments:

Post a Comment