Presentation is loading. Please wait.

Presentation is loading. Please wait.

Databases ©www.teach-ict.com.

Similar presentations


Presentation on theme: "Databases ©www.teach-ict.com."— Presentation transcript:

1 Databases ©

2 A database is a collection of data organised into a structured format.
What is a database? Surname: James First name: Samantha Date of Birth: Address: 16 Poppy Close Town: Southam County: Warwickshire Surname: Brown First name: David Date of Birth: Address: 16 Poppy Close Town: Southam County: Warwickshire Surname: Lastler First name: David Date of Birth: Address: 16 Poppy Close Town: Southam County: Warwickshire Surname: Whitefield First name: Nina Date of Birth: Address: 16 Poppy Close Town: Southam County: Warwickshire A database is a collection of data organised into a structured format. ©

3 The word ‘Database’ is often linked to data held on a computer.
Paper based databases Examples: Telephone directory Address book Card index system Details of car repairs Customer returns book The word ‘Database’ is often linked to data held on a computer. ©

4 Retrieving information
Main difference between paper and computerised databases is speed the data can be accessed. Computerised databases make it possible to analyse data collected. Shops – customer purchases Health authorities – link illnesses to factors e.g. diet Police – build up profiles of crimes/criminals ©

5 Flat files A flat file is a database held in a single file.
A spreadsheet can be used as a flat file database. Video no. Title Country Date released Classification Rental price 1 Lord of the Rings US 2001 12 3.50 2 Attack of the Clones 2002 PG 2.99 3 About a boy UK U 4 Crocodile Dundee AUS 1986 15 1.50 5 Die another day 6 Shrek 1.99 Record Field File ©

6 Flat files - Uses Flat files are useful for:
Lists of contact names and addresses Lists of student grades Details of a video collection However data stored in one flat file cannot easily be linked to data stored in another flat file. ©

7 Flat files - Problems There are several drawbacks to holding anything except very simple data in a single flat file. Have a look at the example and try to find some of the problems which exist with using a flat file as a database. ©

8 Redundant data There is a vast amount of repeated data.
This wastes disk space and slows the database down. Data entry is time consuming ©

9 Errors on input Typographical errors occur when data is entered needlessly. This will affect the quality of the database and the results of queries and data analysis. ©

10 Problems with updating data
If Miss Smith gets married and changes her name, every record would have to be updated. If a lecturer left and a new one was employed, every record for students taking that course would have to be updated. ©

11 Overcoming problems with Flat files
Not all of the data needs to be entered every time. Some of it could be moved to other tables and accessed when required. Which data do you think could be moved to separate tables? ©

12 Using multiple tables The student data could be moved into a separate table as follows: Student ID Student forename Student surname Date enrolled Course code 1 Philip Harris 30/08/2002 119 2 Michael Jenner 09/09/2002 115 3 Ian Bemrose 07/09/2002 4 Meena Akbar 12/09/2002 118 5 James Payne 6 Campbell Naeve 12/10/2002 114 ©

13 Using multiple tables The course data could be moved into a separate table as follows Course Code Course title 114 Physics 115 Chemistry 118 Applied Science 119 ©

14 Using multiple tables The subject information could be moved into a separate table as follows Subject ID Subject Name Day Period Lecturer ID 14 Physiology Tuesday 3 1 15 Atoms 5 2 16 Electrons Monday 4 17 Particles Wednesday ©

15 Using multiple tables The lecturer information could be moved into a separate table as follows: Lecturer ID Lecturer Name Date employed 1 Meaner 03/11/1995 2 Maynard 01/02/2002 3 Noakes 09/10/1999 4 Smith 14/12/2002 A unique ID has been assigned to each lecturer, since if two people were hired with the same name, it would be impossible to distinguish between them. ©

16 Using multiple tables Note that this structure does not currently allow students to take more than one subject. In order to do that, another table will be required. Student_subjectID Student ID Subject ID 001 1 14 002 15 003 2 004 3 005 16 006 4 007 ©

17 Problems solved Redundant data has been reduced.
Risk of errors reduced Modifying and updating data problems resolved ©

18 Flat file information storage and retrieval systems
Read page 95 of Heathcote and write a paragraph explaining the advantages of a ‘database system’ over the ‘traditional file approach’ ©


Download ppt "Databases ©www.teach-ict.com."

Similar presentations


Ads by Google