You are on page 1of 50

Discovering

Computers 2010
Living in a Digital World
Objectives Overview

 See Page 513 Discovering Computers 2010: Living in a Digital World Chapter 10 2
 for Detailed
Objectives Overview

 See Page 513 Discovering Computers 2010: Living in a Digital World Chapter 10 3
 for Detailed
File Processing vs Database
File Processing Databases
Redundant: same fields, multiple Many views to same data
files
Isolated: separate files Related files/tables
Specific to a functional area Data shared across functional areas
Calculations on data Filter, sort, group, link, update
Programming/data integrated Data separate from programming

Discovering Computers 2010: Living in a Digital World Chapter 10 4


File Processing Versus
Databases

Page 525

Discovering Computers 2010: Living in a Digital World Chapter 10 5
Figure 10-10

Databases, Data, and
Information
• Database software, often called a
database management system
(DBMS), allows users to:

Page 515

Discovering Computers 2010: Living in a Digital World Chapter 10 6
Popular Types of Databases

• Relational: data in two-dimensional


tables
• Object-oriented: data & instructions in
objects
• Multi-dimensional: data in dimensions

Discovering Computers 2010: Living in a Digital World Chapter 10 7


Data Models

Data Models define:


 Rules and standards for organizing data


 How users view the data

They do NOT define how the data is

arranged on a disk

Discovering Computers 2010: Living in a Digital World Chapter 10 8


Data Models for Popular
DBMSs

Page 533

Discovering Computers 2010: Living in a Digital World Chapter 10 9
Figure 10-18

Relational Databases

• A relational
database stores
data in tables
that consist of
fields and records
• A relationship is a
link between
tables

Page 533

Discovering Computers 2010: Living in a Digital World Chapter 10 10
Figure 10-20

Relational Databases

• Each table contains data about one


subject
• Each data item about subject is in one
field
• A collection of fields makes up one
record

Discovering Computers 2010: Living in a Digital World Chapter 10 11


Relational Databases

• Table may be called a RELATION


• Field may be called an ATTRIBUTE
• Record may be called a TUPLE

Discovering Computers 2010: Living in a Digital World Chapter 10 12


Relational Database

• Stores data relationships between


tables
• One field (attribute) or combination
uniquely identifies a record: PRIMARY
KEY
• NORMALIZATION is the process of
eliminating duplication

Discovering Computers 2010: Living in a Digital World Chapter 10 13


The Hierarchy of Data

• A record is a group of related fields


– A primary key uniquely identifies each
record
• A data file is a collection of related
records

Page 519

Discovering Computers 2010: Living in a Digital World Chapter 10 14
Figure 10-4

The Hierarchy of Data

• Data is organized in layers


– Files, records, fields, characters

Page 517

Discovering Computers 2010: Living in a Digital World Chapter 10 15
Figure 10-2

Object-Oriented Database

• Stores data in objects


• Stores instructions to process the data
• Objects are re-usable
• Handles unstructured data
– Maps
– Photos
– Videos

Discovering Computers 2010: Living in a Digital World Chapter 10 16


Object-oriented database
(OODB)
• Stores data in objects
• Examples of applications appropriate for
an object-oriented database include:

Page 534

Discovering Computers 2010: Living in a Digital World Chapter 10 17
Multi-dimensional Databases

• Store data in dimensions


• Dimensions: time, products, policies,
etc.
• Consolidates views of data quickly
• Efficient at summarizing large numbers

Discovering Computers 2010: Living in a Digital World Chapter 10 18


Multidimensional Databases

Page 535

Discovering Computers 2010: Living in a Digital World Chapter 10 19
Figure 10-22

Multidimensional Databases

• A multidimensional database can store


data in more than two dimensions of data
– Sometimes known as a hypercube
– Can consolidate data much faster than a
relational database

C lick to vie w W e b
Lin k ,
click C h a p te r 1 0 , C lick
W eb
Lin k fro m le ft
n a vig a tio n ,
Pages 535 - 536
th e n click D a ta Discovering Computers 2010: Living in a Digital World Chapter 10 20
W a re h o u se s
Data warehouses

• A data warehouse is a huge database that


stores and manages the data required to
analyze historical and current transactions
• It may be distributed
• Data mining finds patterns and relationships

C lick to vie w W e b
Lin k ,
click C h a p te r 1 0 , C lick
W eb
Lin k fro m le ft
n a vig a tio n ,
Pages 535 - 536
th e n click D a ta Discovering Computers 2010: Living in a Digital World Chapter 10 21
W a re h o u se s
Maintaining Data

• File maintenance refers to the


procedures that keep data current

Page 520

Discovering Computers 2010: Living in a Digital World Chapter 10 22
Validating Data Integrity

• Compare data to a set of rules after you


enter it
• Reduce data entry errors

Discovering Computers 2010: Living in a Digital World Chapter 10 23


Validating Data Integrity

• Range check
• Alpha or Numeric check
• Non-blank

Discovering Computers 2010: Living in a Digital World Chapter 10 24


Filtering Data

• You can specify what data to


display/update
• Select records
• Select fields

Discovering Computers 2010: Living in a Digital World Chapter 10 25


Sorting and Grouping Data

• You can order the data by any combination


of fields
• You can group data together by the
contents of fields

Discovering Computers 2010: Living in a Digital World Chapter 10 26


Data Types

A field is a combination of

one or more related


characters and has a:
– Field name
– Field size
– Data type

Page 518

Discovering Computers 2010: Living in a Digital World Chapter 10 27
Figure 10-3

Common data types:

Page 518

Discovering Computers 2010: Living in a Digital World Chapter 10 28
Database Integrity = Data
Quality
• Data integrity identifies the quality of
the data
• Garbage in, garbage out (GIGO) points
out the accuracy of a computer’s
output depends on the accuracy of the
input

C lick to vie w W e b
Lin k ,
click C h a p te r 1 0 , C lick
W eb
Lin k fro m le ft
n a vig a tio n ,
Page 516
th e n click D a ta Discovering Computers 2010: Living in a Digital World Chapter 10 29
In te g rity
Maintaining Data

• Validation compares data with a set of


rules or values to find out if the data is
correct

C lick to vie w W e b
Lin k ,
click C h a p te r 1 0 , C lick
W eb
Lin k fro m le ft
n a vig a tio n ,
Pages 522 - 524
th e n click D a ta Discovering Computers 2010: Living in a Digital World Chapter 10 30
V a lid a tio n
Data Dictionary or Repository

Contains data

about:
 each
file/table/relatio
n in the
database
 each
field/attribute
in those files
Pages 527 – 528

Discovering Computers 2010: Living in a Digital World Chapter 10 31
Figure 10-12

DBMS Tools

A DBMS
provides tools
that allow users
and programs
to retrieve and
maintain data
in the database

Page 528

Discovering Computers 2010: Living in a Digital World Chapter 10 32
Query Language

• Consists of simple, English-like


statements that allow users to specify
the data to display, print, or store
• SQL is a popular example

Page 528

Discovering Computers 2010: Living in a Digital World Chapter 10 33
Structured Query Language
(SQL)
SELECT (fields/attributes)
FROM (tables/relations)
WHERE (join requirement)
ORDER BY(fields/attributes)

Discovering Computers 2010: Living in a Digital World Chapter 10 34


Structured Query Language
(SQL)
is a query language that allows users to

manage, update, and retrieve data

Page 534

Discovering Computers 2010: Living in a Digital World Chapter 10 35
Figure 10-21

Database Management
Systems
Query by example (QBE) provides a

GUI to assist users with retrieving data

Page 528

Discovering Computers 2010: Living in a Digital World Chapter 10 36
Report writers

Allow users to design a report on the


screen, retrieve data into the report


design, and then display or print the
report

Page 531

Discovering Computers 2010: Living in a Digital World Chapter 10 37
Figure 10-16

Database Forms

• A form is a
window on
the screen
that provides
areas for
entering or
modifying
data in a
database
C lick to vie w W e b
Lin k ,
click C h a p te r 1 0 , C lick
W eb
Lin k fro m le ft
n a vig a tio n ,
Page 530
th e n click E - Fo rm Discovering Computers 2010: Living in a Digital World Chapter 10 38
b e lo w C h a p te r 1 0
Figure 10-15

Database Management
Systems

Page 531

Discovering Computers 2010: Living in a Digital World Chapter 10 39
DBMS Backup and Restores

• A DMBS provides a variety of techniques


to restore the database to a usable
form in case it is damaged or
destroyed

Pages 531 - 532



Discovering Computers 2010: Living in a Digital World Chapter 10 40
Backup and Recovery

• Backup (copy) the entire database


regularly
• Continuous backup copies each change
• Logs can track changes made
• Record before (before image)
• Record after change (after image)

Discovering Computers 2010: Living in a Digital World Chapter 10 41


Recovery

Roll forward
 R o ll b a ck w a rd
Use log to RE- U se lo g to U N D O
ENTER changes ch a n g e s
made since last
save

U se to re co ve ry
p a rtia l,
Use to recover data in co m p le te
loss tra n sa ctio n s
Discovering Computers 2010: Living in a Digital World Chapter 10 42
Web Databases

• Databases on the Web allow you to:

Page 536

Discovering Computers 2010: Living in a Digital World Chapter 10 43
Web Databases

Page 536

Discovering Computers 2010: Living in a Digital World Chapter 10 44
Figure 10-23

How a Photo Sharing Site
Keeps Its Data

Discovering Computers 2010: Living in a Digital World Chapter 10 45


Database Administration

• It is important to have a carefully


designed database

C lick to vie w W e b
Lin k ,
click C h a p te r 1 0 , C lick
W eb
Lin k fro m le ft
n a vig a tio n ,
Page 537
th e n click D a ta b a se Discovering Computers 2010: Living in a Digital World Chapter 10 46
D e sig n G u id e lin e s
Figure 10-24

Database Administration

C lick to vie w W e b
Lin k ,
click C h a p te r 1 0 , C lick
W eb
Lin k fro m le ft
n a vig a tio n ,
Page 538
th e n click D a ta b a se Discovering Computers 2010: Living in a Digital World Chapter 10 47
A d m in istra to rs b e lo w
Database Administration

• Employees should
learn how to use
the data in the
database
effectively
– Interact with
database
– Identify new
data for the
database
– Maintain the
database
Page 538

Discovering Computers 2010: Living in a Digital World Chapter 10 48
Figure 10-25

Summary

Page 539

Discovering Computers 2010: Living in a Digital World Chapter 10 49
Discovering
Computers 2010
Living in a Digital World

C h a p te r 1 0 C o m p le te