Presentation is loading. Please wait.

Presentation is loading. Please wait.

Databases.

Similar presentations


Presentation on theme: "Databases."— Presentation transcript:

1 Databases

2 What is a database? A database is a collection of data
Maybe computerised Will be organised so as to make the retrieval and maintenance of data as easy as possible A computerised database: Offers the great advantage of speed More sophisticated databases will use database management software MS Access is an RDBMS – Relational Database Management System

3 Flat files A flat file is a database held in a single file
The data stored in one file cannot easily be linked to data stored in another file. These so-called ‘flat files’ are useful for: a list of contact names and addresses a list of student grades details of a video collection. A spreadsheet can be used as a flat file database, with a column representing a field and a row representing a record.

4 Flat file problems Redundant data – repetition of the same data
makes the file larger than necessary wastes space on disk makes it slow to retrieve information Errors arising from typing the same data many times in different records Typographical errors occur Loss of data consistency Difficulties in updating and modifying data All occurrences would have to be located and changed

5 Solving the flat file problems
Study this flat file data for a moment Identify some of the problems that have occurred Consider how multiple tables would improve the database for this orders flat file

6 Multiple tables Each entity should have its own table
Each record must have a unique ID. This is the principle behind relational databases. The following tables would be created from the previous flat file

7 Multiple tables This would then mean that the orders table would look like: In reality, the supplier data in the Products table would be regarded as a separate entity and have its own table Why is price retained as a field in the orders table?

8 Database system .v. flat file
data independence structure of the database does not affect the programs which access the database quality of management information information more useful as it is based on a single, comprehensive set of data control over redundancy data is not stored several times in separate files consistency of data because data is only stored once, no possibility of holding different data on different files (e.g. different addresses for the same employee)

9 Database system .v. flat file (cont.)
more information available to users because the data is held in a single, company-wide database, all users have access to it greater security of data users can only view or update the parts they are authorised to access or change less time spent inputting data because it is held only once, there is no duplication of effort inputting the same data into different files.


Download ppt "Databases."

Similar presentations


Ads by Google