Sunday 27 November 2011

Database

Introduction

It is a new topic about databases.In this post I will be talking about what I have learnt about databases.

What is a database ?

 A database is a collection of data or information which is held together
 in an organised or logical way.

Paper-based databases

Have you ever :

- kept details of your friends or families birthdays in a birthday book ?

 written your friend's addresses into an address book ?

- owned  a copy of the Yellow Pages at hom VB
If you have answered YES to any of  these questions, then you have used a 'paper-based' database.

 - Birthdays were organised in logical order of 'month'
- Addresses were stored in logical order of 'surname'
- Telephone numbers were stored in logical order of 'profession' [jobs] e.g. gardener, builder, plumber.

These are all examples of `paper-based` database. However , when we use the term database we generally refer to  computerised database.

Computerized databases

There are many examples of computerized databases, some of which you well have used at home or school. Examples is when using a search engine ,such as Google, in order to find the right websites that you are looking for search engines require a vast computerized database that save websites which they search through, when key words are entered.

An other example Many schools , including Cranford Community college, now use electronic registers. These particular databases consents of records for every student in the school for mainly attendance both at school and lessons. More example are in the next section.

Daily Life Uses 

Online database

- If you would not use a paper-based database , a telephone number can be easily found and saves time by using the alternative way of finding information , online databases such as yell.co.uk

Electoral roll

The electoral roll is the details over the age 18 kept on local electoral registers . This database inculdes the following information 


  • your name
  • address
  • date of birth[d.o.b]
  • national insurance number
When election is imminent , cards are printed every person who is eligible to vote , over 18, . The cards are then sent to their home address. The card must be brought along to the polling station in order to vote.

Police 

The police uses various databases  to help solve crimes and track down criminals . From the record they obtain patterns and trends in crimes and this helps to establish whether a person could be reasonable for a series of crimes or assaults that have occurred .They able to gain more information by co-operating with other police forces .

A Library   

The library stores details of the book information.When you want to know if a book is in stock, you can not only look it up, but you can also check when it is due to be returned.
The database also records details of all the borrowers, what books they currently have borrowed and when they are due back.

The library database could be also be used for other tasks , recording bans and   monitoring use of computers e.c.t .  

Computerized V.S Paper-Based


Computerised Paper-Based
Can hold a vast amount of dataLimited by physical storage space available
Very fast to find a specific recordCan take a while to manually search through all of the records
Can easily search for a specific criteria e.g. "all of the people who live in Warwick"Difficult to search for a specific criteria; every record would have to be manually looked at.
Can be used to analyse the data e.g. 'most popular selling item'Very difficult to analyse the data
Data can be sorted into ascending or descending order on multiple criteriaDifficult to sort data on more than one criteria.
Can easily update or amend a record e.g. customer's address after moving houseChanges have to be done manually. Records can look messy if scribbled out.
Records are stored safely, they are available when neededRecords can be lost or misfiled making it hard to find them
The database can be kept secure by use of passwordsThe only security would be locking up the records.
Easy to make a back-up in case of data lossDifficult to make a back up because every page/card would have to be re-written or photocopied. This means extra storage space is needed.

This table comes from the website `http://www.teach ict.com/ks3/year7/data_handling/miniweb/pg3.htm`


Tables


When talking about tables and also talking about databases we do not mean the table that we eat on I am talking about the table that represents data. Databases store data or information in tables like the one below.



database table
   This image of the table was copied from the website ` http://www.teach-          
ict.com/ks3/year7/data_handling/miniweb/pg4.htm`

This table lets you see all of the records stored in a database. Tables can consist of  plenty records, from a few records to millions for a large organisation database.

Records

As you may have picked up by now tables are a great source of information.Tables contain loads of records.
An actual record means a particular piece of information about one person or thing.

In the table below, all of the information that is provided is about each cartoon character is stored in a `row` or `record` .


    Image copied from `http://www.teach-ict.com/ks3/year7/data_handling/miniweb/pg5.htm`
database record

Fields 


Each table is made up of lots of records

A record is created from individual pieces of information these bits of information are called fields.
So a field ,when talking about databases, is not where you can play football it is a piece of data about one thing or person


database field

Image obtained from `http://www.teach-ict.com/ks3/year7/data_handling/miniweb/pg6.htm`.


Data Types

When setting up a database , one key element is to chose what data type which you will use for each field.
Data type is what type of text is allowed to be entered.

some of the most common data types the follwing :

Alphanumeric or text

This lets you type in text , numbers and symbols

example

First name: Max

Surname:  smith

Address: 48, High Street

Postcode: CV34 5TR

Car Registration : EP05 6TY

Telephone number: 01926 123457

Numbers

This allows a whole number or a decimal number.Only numbers may be entered
on this data type no symbols or letters are allowed to typed .

Example

15

23.46


Currency

This enables the user to automatically format the data to have a currency symbol , £ ,$ or a euro sign.

Example

$5.99

£10.40

Date/Time

This restricts the user to entry to 1-31 for day[ but also 28 or 30 in appropriate months] and 1-12 for month.
The particular data type is automatically check if the date is real, for example, it would not allow 31/02/06 to be typed.

It also formats the dates into long medium and short date/time .

Example

Long Date : 8 February 2007

Medium Date : 8-Feb-07

Short Date : 08/02/07

Long Time : 19:30:08

Medium Time : 07:30 PM

Short Time : 19:30


Autonumber

This type of data will automatically increase by 1 as the records are added to the chosen database.

Example

1:1

1:2

1:3

1:4

Yes/No,Boolean,Logical

This setting is often associate to as different things you may listened to it as `logic`,  or `boolean` or yes/ no .
This datatype , means that it is restricted to one option of two choices.

Example

Male/Female

Yes/No

On/Off

Hot/Cold

It might be difficult to understand how the data types were used ,to help you visualise  I have copied an image from `http://www.teach-ict.com/ks3/year7/data_handling/miniweb/pg6.htm` .

data types


No comments:

Post a Comment