adapted from: fatmax 2007. licensed under a creative commons attribution-noncommercial- sharealike...

14
Adapted from: FatMax 2007. Licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Database

Upload: julian-shepherd

Post on 18-Jan-2018

223 views

Category:

Documents


0 download

DESCRIPTION

FatMax Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 LicenseCreative Commons Attribution-NonCommercial-ShareAlike 2.5 License What is a Database? A collection of organised data Data has structure Can be paper-based - Manual More common to talk about electronic databases i.e. computer-based

TRANSCRIPT

Page 1: Adapted from: FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 2.5 LicenseCreative Commons Attribution-NonCommercial-

Adapted from: FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License

Database

Page 2: Adapted from: FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 2.5 LicenseCreative Commons Attribution-NonCommercial-

FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License

Data Storage and Retrieval Databases are used to store data that will be

processed into information. Information is used to make decisions Feedback from the decisions may affect the input of

the next data

OUTPUTINPUT PROCESS

FEEDBACK

Page 3: Adapted from: FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 2.5 LicenseCreative Commons Attribution-NonCommercial-

FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License

What is a Database? A collection of organised data Data has structure Can be paper-based -

Manual More common to talk about

electronic databases i.e. computer-based

Page 4: Adapted from: FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 2.5 LicenseCreative Commons Attribution-NonCommercial-

FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License

Flat File Databases A flat-file database is a simple database

that stores all data in a single table

A flat-file database can be stored in a text file, such as a tab-delimited file; a spreadsheet; or in a database file that contains one or more unrelated tables.

Page 5: Adapted from: FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 2.5 LicenseCreative Commons Attribution-NonCommercial-

FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License

Database Concepts Flat file example

FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License

RecordA single record will hold all the data relating to one unit of processing. e.g a track

FieldA field stores one item of data for the record

FileData file contains a number of records

Page 6: Adapted from: FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 2.5 LicenseCreative Commons Attribution-NonCommercial-

FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License

Database Concepts 2Data types (Access specific) There are 5 main data types

Text

Date

Numeric

Boolean

Counter

Characters

True/False

Numbers

Various formats

Auto-inserted no.

Page 7: Adapted from: FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 2.5 LicenseCreative Commons Attribution-NonCommercial-

FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License

Flat File Databases 2 Useful for simple lists:

• Address book/contact list• CD collection

But many problems

Page 8: Adapted from: FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 2.5 LicenseCreative Commons Attribution-NonCommercial-

FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License

Problems with flat filesRedundancy Large amounts of

duplicated data Makes data entry

slower Uses disk space Leads to other

problems…

Page 9: Adapted from: FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 2.5 LicenseCreative Commons Attribution-NonCommercial-

FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License

Problems with flat files 2Reduced data integrity More likely to be inaccurate!

Due to:• Data input errors• Inconsistent data entry

Page 10: Adapted from: FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 2.5 LicenseCreative Commons Attribution-NonCommercial-

FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License

Flat files – more problemsDifficult to update

• If entries change all instances have to be updated

Security• All users have access to the same set of data

Program-Data Dependence• The user interface (amongst other things) is

tied to a specific file. To create new views of data you would need to create new data files

Page 11: Adapted from: FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 2.5 LicenseCreative Commons Attribution-NonCommercial-

FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License

Overcoming problems - RDBMS The problems associated with flat files can be

solved by moving some of the data out of the main table and accessing it when required

A relational database (RDBMS) is a more complex database that stores data in multiple tables that are interrelated.

Page 12: Adapted from: FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 2.5 LicenseCreative Commons Attribution-NonCommercial-

FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License

True or False Quiz http://www.teach-ict.com/gcse/software/db/

starters_plenaries/gcsedatayesno.htm Quick Questions to get a game http://www.teach-ict.com/xml/finished/4304/breakout.htm Input, processing, output, feedback game http://www.teach-ict.com/gcse/theory/infosystems/

starters_plenaries/gcseinformationballoons.htm

Page 13: Adapted from: FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 2.5 LicenseCreative Commons Attribution-NonCommercial-

FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License

RDBMS In the example on the previous slide

there is still a problem in the ORDERS table. How would you resolve it?

Page 14: Adapted from: FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 2.5 LicenseCreative Commons Attribution-NonCommercial-

FatMax 2007. Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License

RDBMS - benefits Reduced redundancy Improved data consistency Improved data integrity Better security Program-data independence