database ◦ a place where data can be stored and retrieved. objects ◦ an option you can...

21
DATABASES

Upload: ross-french

Post on 26-Dec-2015

226 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

DATABASES

Page 2: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

Database◦ A place where data can be stored and retrieved.

Objects◦ An option you can manipulate. Eg. Tables, forms,

queries. Tables

◦ Tables are used to store the data being managed

Definitions

Page 3: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

Forms◦ Forms provide a way of displaying and entering

data. Reports

◦ Reports let you print or view data in a useful format

Queries◦ A way of storing and answering questions within

the database

Definitions

Page 4: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

Libraries Birth Papers Drivers Permits Passports Facebook

Examples of databases

Page 5: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

Advantages◦ No specific training required

Disadvantages◦ Data is often duplicated◦ Time consuming◦ Inconsistency of data◦ Data cannot be shared easily

Manual Databases

Page 6: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

A computerized database where data can be stored in a structured and organized way so that data can be retrieved much faster.

Database Management System

Page 7: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

Advantages◦ Information can be retrieved faster◦ Data duplication is reduced◦ Increased Security◦ Less errors◦ Reduces long term storage costs

Disadvantages◦ Specialized software needed◦ They can be expensive to implement and hard to

maintain◦ Sometimes time consuming

Computer Databases

Page 8: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

DATA TYPE PURPOSE

Text Used to store alphanumeric characters (letters or numbers). Et. Name, address, phone number, country

Number Used to store numbers with or without decimal places. Eg. Age, average, quantity.

Currency Used to store money values. Eg. Salary, price, discount

Date/Time Used to store date/time values. Eg. Date of bith, date joined, death date

Autonumber Creates automatic numbers. Eg. ID number

Memo Used to store long text notes or paragraphs. Eg. Remarks

Yes/No Used to store yes or no. eg. Pass or Fail

Data Types

Page 9: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

TABLES

Page 10: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

A table is a collection of records. It is made of a set of rows and columns The information entered into the database

is stored in a table

Attributes of tables

Page 11: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

A record is a collection of related fields. It contains a single row and many columns.◦ Eg. The record of a persons existence is a birth

paper. It contains one row but many fields that are related.FIRSTNAME, SURNAME, PLACE OF BIRTH, MOTHER, FATHER, HOSPITAL.Everything is related to the reason the person is in the database.

Records

Page 12: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

A field is a single column in a table that stores data.

A field can also be referred to as an attribute.◦ Eg. NAME, AGE, DATE OF BIRTH, PHONE NUMBER,

ADDRESS, SEX.

Fields

Page 13: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

It is the type of data that a field can store.◦ Eg. ◦ The AGE FIELD would store a number◦ The FIRST NAME FIELD would store text

Field Type or Data Type

Page 14: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

A field description describes what is in the field. The description helps other users of the database to understand what it is used for.

Field Description

Page 15: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

Design View◦ Where you design the database, label the fields,

choose the field type and enter a field description.

Database Views

Page 16: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

Datasheet View◦ Where you enter information into the database

that you created.

Database Views

Page 17: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

FIELD NAME DATA TYPE DESCRIPTION

STORM NAME TEXT NAME OF THE STORM

ORIGIN TEXT PLACE WHERE IT ORIGINATED

DATE OF ORIGIN DATE/TIME DATE STORM WAS FORMED

CATEGORY NUMBER CATEGORY FROM 1 TO 5

MAJOR HURRICANE YES/NO WHETHER THE STORM BECAME A MAJOR HURRICANE

Practical Exercise – Create the following Database

Page 18: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

Storm Name

Origin Date of Origin

Category Major Hurricane

Bertha Coast of Africa

3/07/2008 3 Yes

Dolly Caribbean Sea

20/07/2008 2 No

Gustave Winward Islands

25/08/2008 4 Yes

Hanna Leeward Islands

28/08/2007 2 No

Kyle Caribbean Sea

29/09/2007 2 No

Enter the following storms in the database.

Page 19: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

FIELD NAME DATA TYPE DESCRIPTION

First Name Text

Surname Text

Age Number

Primary School Text

Secondary School Text

Favourite Subject Text

Favourite time of Day Date/Time

Favourite Artist Text

Love School? Yes/No

Love Sleep Yes/No

Practical 2 – Create a database with the following fields

FILL THE TABLE WITH 10 PEOPLE

Page 20: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

Field Name Data Type Description

Customer ID Text Customer ID

Last Name Text Last Name

First Name Text First Name

Address Text Address

Birth Date Date/Time Date of Birth

Home Tel Text Home Telephone

Work Tel Text Work Telephone

Email Text Email Address

Gender Text Gender

Work Place Text Place of Employment

Practical 3 – Create the following database naming it “Video Club”

Page 21: Database ◦ A place where data can be stored and retrieved.  Objects ◦ An option you can manipulate. Eg. Tables, forms, queries.  Tables ◦ Tables are

Field Name Data Type Description

DvdID Text 6 Digit Unique Number

Title Text Enter Title

Typecode Text 2 digit code

Rated Text Rating

Mins Number Minutes

Cost Currency Cost of DVD

Quantity Number Quantity in Stock

Create a second table named DVD