Computing and Information Science
1
Databases
START
Computing and Information Science
2
What is a Database
A database is acollection of data.
The data that iscollected can beorganised for aparticular purpose
database
Computing and Information Science
3
Fields
NEXT
In a database, a field is one piece of information about aperson or thing.  For example, a database about pupilsmight have the following fields:
Forename
Surname
Form class
Date of birth
Computing and Information Science
4
Records
NEXT
In a database, a record is all the information whichrelates to one person or thing.  So if we look at a schooldatabase, all the information about one pupil (forename,surname, date of birth and form class) would be onerecord in the database.
Or, if you look at the phone book, thename, address and telephone numberfor one person is a record.
yellow pages2
Computing and Information Science
5
Files
NEXT
In a database, a file is the entire collection ofinformation.  In a school database, this would be therecords on all the pupils in the school
Or, if you look at the phone book, theentire book would be the file.
yellow pages
Computing and Information Science
6
Summary of Structure
NEXT
If we think of a database as a table of information, thenwe can identify the structure as:
 FIELD is a column
 RECORD is a row
 FILE is the complete
        table
Fields
Records
File
Computing and Information Science
7
Searching
simple search
is a search where you are only looking for one value onone field, e.g. surname = Jones.
complex search
is when you are searching for more than one thing
-either on different fields (e.g. surname = Jones andforename = Brian),
-or for different values in the same field (e.g. surname =Jones or surname = Smith).
NEXT
Computing and Information Science
8
Search Operators
Search operators are used to help specify the records weare searching for.  Common examples are:
NEXT
Equals (=)
greater than (>)
less than (<)
highest or lowest value
If you are carrying out a complex search, the searchcriteria can be linked by using AND or OR.  Using AND willfind records meeting both criteria only, and using OR willfind records  meeting either of the criteria specified.
Computing and Information Science
9
Sorting
Sorting simply means putting the database into order, eitherascending (A – Z,
1 – 100) or descending (Z – A, 100 - 1).  A sort on one field of thedatabase (e.g. surname or date of birth) is known as a simplesort.
NEXT
Surname
Forename
Smith
William
Smith
Thomas
Smith
Abigail
Thomson
Fred
Thomson
Julie
Computing and Information Science
10
Sorting
NEXT
complex sort is when the database is sorted on more than onefield, e.g. sorted in order of surname and forename.  This means thatif there is more than one record containing the same surname thenthey will be sorted by forename.
Surname
Forename
Smith
Abigail
Smith
Thomas
Smith
William
Thomson
Fred
Thomson
Julie
Computing and Information Science
11
Editing a Database
NEXT
A database that has been created can be editedby either adding or deleting records or adding ordeleting fields.
Adding a field allows more data to be stored.
For example  adding the date of births to amembers club database.
Computing and Information Science
12
Creating a Database
Before creating a database it is very important to design which field namesand field types are to be used.
NEXT
Common field types used are.
Text :Any field which contains letters and numbers
Number:     Any field which contains only numbers
Date/Time:Any field which contains a date or time
Boolean (Yes/No):A field which contains only two values eithertrue/false or yes/no
There are other field types available but these are the most commonlyused.
Computing and Information Science
13
Creating a Database
The length of each field is also important.
The database should not have too much room for set aside but also cannotuse too little.
For example:
A database may hold chefs names, including Ken Hom and Marco PierreWhite.
For the forename field we will need to have at least 5 characters for the chefsgiven (Ken and Marco)  but there may be chefs with longer forenames so weshould perhaps set aside 10 characters for forename.
 For the surname field we will need to have at least 12 characters for thechefs given (Hom and Pierre White, a space is counted as a character) butthere may be chefs with longer surnames so we perhaps should set aside 20characters.
NEXT
ken hom
marco pierre white
Computing and Information Science
14
Altering Output Format
NEXT
You can alter the output format of your database bychoosing which fields/records will appear either on themonitor or on printout, for example:
Computing and Information Science
15
Reporting
One of the most powerful features of database packages isthe reporting feature.   This allows you to use any part ofyour database to create printed report on specific area.Reporting allows you to:
Select which fields you want to appear
Select which records you want to appear
Select the order in which the records appear
Include calculations on the data
Add text and formatting to the such as report
   headings, underlining, page numbering and so on.
NEXT
Computing and Information Science
16
Creating a graphic field
Creating graphics field allows pictures to be included intoyour database.
This is an important feature, making databases moreinformative.
For example the passport office, police and customs wouldall make use of databases like these.
NEXT
passport photo
database photo
Computing and Information Science
17
Creating a Computed Field
computed field is field type which involves calculation.
The data the field contains is calculated using the values ofdata in other fields of the record.
For example record might consist of fields.
Name of product:Text
Cost Price:Number
VAT:Number
Total Cost:Calculated  (Cost Price VAT)
NEXT
Computing and Information Science
18
Calculating Storage Requirements Example
Here is the design for a simple school database whichcontains 300 records.
NEXT
The storage required for one record:
  20 + 20 + 4 + 40 + 15 = 99 bytes
Computing and Information Science
19
Calculating Storage Requirements Example
There are 300 records in the database, so the totalstorage space required is:
99 x 300 = 29 700 bytes
We can convert this to kilobytes by simply dividing thetotal by 1024:
29 700/1024 = 29kb
NEXT
Computing and Information Science
20
Multimedia Databases
Many CD-Roms contain information stored in a database. Forexample, a multimedia encyclopaedia is essentially a database ofarticles. These databases usually have a search tool that allows youto find articles containing keywords.
Find articles including the phrase “World War One”
It is also possible to do more complex searches involving severalkeywords using AND, OR and NOT
Find articles including the words “World War One” OR “FirstWorld War”
It is also possible to search web pages in the same way using aSearch Engine such as google or altavista
Computing and Information Science
21
Data Protection Act (1998)
The Data Protection Act (1998) became law on 1st March 2000.  Itgoverns the processing and storage of personal information held byorganisations/businesses/schools on computer.  It also governs somepaper records.
If an organisation is going to store data about people, it has to registerthis intention with the Data Protection Commissioner, who keeps apublic register.  This register stores the name and address of the datacontroller, and description of the processing being carried out.Individuals can consult the register to find out what processing isbeing carried out.  The data subject must also be aware of the databeing stored and for what purpose.
NEXT
Computing and Information Science
22
Data Protection Act - Principles
The following definitions apply under the Data ProtectionAct:
NEXT
Data Subject 
The person whom the information is about.
Data Controller 
The organisation collecting and controllingpersonal information
Data User 
Someone authorised by the Data Controller(eg an employee) to use the personalinformation
Computing and Information Science
23
Data Protection Act - Principles
Personal information must be:-
Obtained and used fairly andlawfully.
Only used for specified purposes(the purpose must be specifiedprior to obtaining the data).
Adequate, relevant and notexcessive.
Accurate.
Processed in accordance with thedata subject’s rights.
Secure.
NEXT
And must not be:-
Kept longer than necessary,
Transferred to countrieswithout adequate protection.
There are 8 data protection principles:
Computing and Information Science
24
NEXT
To see personal information being held about you (right ofsubject access).
To prevent processing likely to cause substantial damage ordistress (not in all cases).
To prevent processing for the purposes of direct marketing.
To take action to rectify, block, erase or destroy inaccuratedata.
To ask Commissioner to assess whether the Act has beencontravened.
To take action for compensation if damage or distress iscaused.
Under the Data Protection Act, a Data Subject has thefollowing rights:-
Data Protection Act - Definitions
Computing and Information Science
25
Computer Misuse Act (1990)
The Computer Misuse Act (1990) was made to try toprevent unauthorised access to computers, otherwiseknown as hacking.  Under the Act, it is illegal to:
Gain unauthorised access to computer, itsprograms and its data;
Gain unauthorised access to computer, itsprograms and its data with the intent to commit afurther offence;
Modify computer material after gainingunauthorised access this includes hardware,programs and data.
NEXT
Computing and Information Science
26
Copyright, Designs & Patents Act (1988)
This act gives people certain rights over work they do. Itcovers books, music, films and computer programsamong other things. The act makes it illegal to
Create copies of work (e.g. pirate software, copymusic CDs and DVDs)
Use illegally copied materials (e.g. listening topirated CDs)