Tutorial 10

43
Chapter 10 Database Management

description

 

Transcript of Tutorial 10

Page 1: Tutorial 10

Chapter 10 Database Management

Page 2: Tutorial 10

Chapter 10 Objectives

Discuss the functions common to most DBMSs

Discuss the functions common to most DBMSs

Identify the qualities of valuable information

Identify the qualities of valuable information

Explain why data is important to an organization

Explain why data is important to an organization

Discuss the terms character, field, record, and file

Discuss the terms character, field, record, and file

Identify file maintenance techniquesIdentify file maintenance techniques

Differentiate between a file processing system approach and the database approach

Differentiate between a file processing system approach and the database approach

Describe characteristics of relational, object-oriented, and

multidimensional databases

Describe characteristics of relational, object-oriented, and

multidimensional databases

Explain how Web databases workExplain how Web databases work

Discuss the responsibilities of database analysts and administrators

Discuss the responsibilities of database analysts and administrators

Next

Page 3: Tutorial 10

Data and Information

How are data and information related?

p. 10.02 Fig. 10-1 Next

processing

data stored on diskStep 1. The member data, including a photograph, is entered and stored on the hard disk.

Step 2. The computer extracts the member data from disk.

Step 3. The receipt is created and printed.

Data is raw facts Information is data that is organized

and meaningful

receipt

Computers process data into information

Page 4: Tutorial 10

Add, change,

and delete data

Add, change,

and delete data

CreatedatabaseCreate

database

Sort and

retrieve data

Sort and

retrieve data

Createforms and

reports

Createforms and

reports

Data and Information

What is a database?

p. 10.03 Next

Database software allows you to

Database software allows you to

Collection of data organized so

you can access, retrieve, and

use it

Collection of data organized so

you can access, retrieve, and

use it

Database software also called database management system

(DBMS)

Database software also called database management system

(DBMS)

Click to view animation

Page 5: Tutorial 10

Data and Information

What is data integrity?

p. 10.03 Next

Degree to which data is correct Garbage in, garbage

out (GIGO)—computer phrase that means you cannot create correct information from incorrect data

Garbage out

Garbage in

Data integrity is lost

Page 6: Tutorial 10

UsefulUsefulAccessibleAccessible

OrganizedOrganized

Data and Information

What are the qualities of valuable information?

p. 10.04 Next

TimelyTimely

VerifiableVerifiable

AccurateAccurate

Cost-effectiveCost-effective

Page 7: Tutorial 10

The Hierarchy of Data

What is a hierarchy?

p. 10.05 Fig. 10-2 Next

Database contains files, file contains records, record contains fields, field contains characters

Page 8: Tutorial 10

The Hierarchy of Data

What is a field?

p. 10.05 Fig. 10-3 Next

Combination of one or more characters

Smallest unit of data user accesses Field size defines the maximum

number of characters a field can contain

Field name uniquely identifies each field

Data type specifies kind of data field contains

Page 9: Tutorial 10

Yes/NoYes/No(also called Boolean)

—only the values Yes or No (or True

or False)

HyperlinkHyperlinkWeb address that links to document or Web page

Yes/NoYes/No(also called BLOB for binary large object)—photograph, audio, video,

or document created in other application such as word processing or spreadsheet

The Hierarchy of Data

What are common data types?

p. 10.06 Next

CurrencyCurrencydollar and cent amounts or

numbers containing decimal values

DateDatemonth, day, year, and

sometimes time

MemoMemolengthy text entries

TextText(also called

alphanumeric)—letters, numbers, or special

characters

NumericNumericnumbers

only

AutoNumberAutoNumberunique number automatically assigned to each new record

Page 10: Tutorial 10

The Hierarchy of Data

What is a record?

p. 10.06 Next

Group of related fields

Key field, or primary key, uniquely identifies each record

Page 11: Tutorial 10

The Hierarchy of Data

What is a data file?

p. 10.07 Next

Collection of related records stored on disk

key field

records fields

22 Fifth Avenue

P.O. Box 45

15 Duluth Street

33099 Clark Street

1029 Wolf Avenue

Address

Auburn

Clanton

Prattville

Montgomery

Montgomery

City

ALWeinbergJonah3928

ALMarcus4872

ALValesquezAdrian3376

ALMurrayShannon2928

ALVandenbergDonna2295

StateLast NameFirst NameMember ID

Green

Page 12: Tutorial 10

Maintaining Data

What is file maintenance?

p. 10.08 Next

Changing recordsAdding records

Deleting records

Procedures that keep data current

Page 13: Tutorial 10

Maintaining Data

Why do you add records?

p. 10.08 Fig. 10-5 Next

Add new record when you obtain new data

Page 14: Tutorial 10

Maintaining Data

Why do you change records?

p. 10.09 Fig. 10-6 Next

Correct inaccurate data Update old data

Page 15: Tutorial 10

Maintaining Data

Why do you delete records?

p. 10.10 Fig. 10-7 Next

When record no longer is needed Some programs remove record immediately,

others flag record

Page 16: Tutorial 10

Maintaining Data

What is validation?

p. 10.10 Fig. 10-8 Next

Process of comparing data with a set of rules to find out if data is correct

SAMPLE VALID AND INVALID DATA

10-20-200410-13-2004

10-20-200410-27-2004

Date JoinedTraining Date

ConsistencyCheck

ValesquezLast NameCompletenessCheck

$95.25$39.50Monthly FeeRange Check

3rto936109Postal CodeNumericCheck

Ad33nAdrianFirst NameAlphabetic Check

Invalid DataValid DataField Being Checked

Validity Check

Reduce data entry errors and enhance data integrity before program writes data on disk

Page 17: Tutorial 10

Consistency Check tests for logical relationship between two or more fields

Consistency Check tests for logical relationship between two or more fields

Maintaining Data

p. 10.11 Next

Click to view Web Link,then click Check Digits below Chapter 10

What are the types of validity checks?

Range Check determines whether number is within specified range

Range Check determines whether number is within specified range

Completeness Checkverifies that a required field contains data

Completeness Checkverifies that a required field contains data

Check Digit number(s) or character(s) appended to or inserted into a primary key value to confirm accuracy of primary key value

Check Digit number(s) or character(s) appended to or inserted into a primary key value to confirm accuracy of primary key value

Alphabetic/Numeric Check ensures correct type of data entered

Alphabetic/Numeric Check ensures correct type of data entered

Page 18: Tutorial 10

Isolated data—data stored

in separate files so it is difficult to

access

Isolated data—data stored

in separate files so it is difficult to

access

File Processing Versus DatabasesWhat is a file processing system?

p. 10.11 Next

Data redundancy—

same fields stored in

multiple files

Data redundancy—

same fields stored in

multiple files

Each department or

area within organization

has own set of files

Each department or

area within organization

has own set of files

May have weaknessesMay have

weaknesses

Records in one file may not relate to

records in any other file

Records in one file may not relate to

records in any other file

Page 19: Tutorial 10

File Processing Versus DatabasesWhat is the database approach?

p. 10.12 Fig. 10-9 Next

Many programs and users can share data in database Secures data so only authorized users can access

certain data

Page 20: Tutorial 10

File Processing Versus DatabasesWhat are the strengths of the database approach?

p. 10.13 Next

Reduced data

redundancy

Reduced data

redundancy Improved data

integrity

Improved data

integrityShared

dataShared

dataEasier accessEasier access

Reduced development

time

Reduced development

time

Page 21: Tutorial 10

File Processing Versus DatabasesHow do a database application and a file processing application differ in the way they store data?

p. 10.13 Fig. 10-10 Next

File Processing Example

Database Example

Page 22: Tutorial 10

Database Management Systems

What are popular database management systems (DBMSs)?

p. 10.14 Next

Click to view Web Link,then click Database Management System below Chapter 10

Personal computer, midrange server, mainframe

IBM CorporationDB2

Personal computer, midrange server, mainframe

IBM CorporationInformix

ServerMicrosoft CorporationSQL Server

Personal computer, midrange server, PDA

Sybase Inc.Sybase

Personal computer, midrange server, mainframe, PDA

Oracle CorporationOracle

Personal computer, midrange server, mainframe

Computer Associates International, Inc.

Ingres

Personal computer, server, PDAMicrosoft CorporationAccess

Computer TypeManufacturerDatabase

Page 23: Tutorial 10

Database Management Systems

What is a data dictionary?

p. 10.14 Fig. 10-12 Next

Click to view Web Link,then click Data Dictionary below Chapter 10

Contains data about each file in database and each field within those files

Page 24: Tutorial 10

Database Management Systems

What is a query?

p. 10.16 Fig. 10-13 Next

Request for specific data from a database

Query language consists of simple, English-like statements that allow users to specify data to display, print, or store

Step 1. Select the fields you want to display in the resulting query.

Step 2. Assign a name to the query, so you can open it later.

Step 3. View query on the screen.

Page 25: Tutorial 10

Database Management Systems

What is a query by example (QBE)?

p. 10.17 Fig. 10-14 Next

Program retrieves records that match criteria entered in form fields

Query by example screen

criteriaQuery results

Has a graphical user interface that assists users with retrieving data

Page 26: Tutorial 10

Database Management Systems

What is a form?

p. 10.17 Fig. 10-15 Next

Window on screen that provides areas for entering or changing data in database

Used to retrieve and maintain data in a database

Form that sends data across network or Internet is called e-form, short for electronic form

Page 27: Tutorial 10

Database Management Systems

What is a report generator?

p. 10.18 Fig. 10-16 Next

Allows user to design a report on screen, retrieve data into report design, then display or print reports

Also called report writer

Page 28: Tutorial 10

Database Management Systems

What is data security?

p. 10.18 Next

Read-only privilegesuser can

view data, but cannot change it

Read-only privilegesuser can

view data, but cannot change it

DBMS provides means to ensure only authorized users can access

data

DBMS provides means to ensure only authorized users can access

data

Access privileges

define activities that specific user or group of users

can perform

Access privileges

define activities that specific user or group of users

can perform

Full-update privileges user can view and

change data

Full-update privileges user can view and

change data

Page 29: Tutorial 10

Database Management Systems

What are backup and log?

p. 10.19 Fig. 10-17 Next

Backup is a copy of the entire database

Log is a listing of activities that change database contents DBMS places three items

in log: before image, actual change, and after image

before image

change

after image

Page 30: Tutorial 10

Database Management Systems

What is a recovery utility?

p. 10.20 Next

Click to view Web Link,then click Backup and Recovery below Chapter 10

Uses logs and/or backups to restore database when it is damaged or destroyed

Rollforward— DBMS uses log to re-enter changes made to data-base since last save or backup

Also called forwardrecovery

Rollback— DBMS uses log to undo any changes made to database during a certain period of time

Also called backwardrecovery

Page 31: Tutorial 10

Relational, Object-Oriented, and Multidimensional Databases

What is a data model?

p. 10.20 Fig. 10-18 Next

Rules and standards that define how database organizes data

Defines how users view organization of data

Three popular data models Relational Object-oriented Multidimensional

DATA MODELS FOR POPULAR DBMSs

Page 32: Tutorial 10

Relational, Object-Oriented, and Multidimensional Databases

What is a relational database?

p. 10.20 Fig. 10-19 Next

Click to view Web Link,then click Relational Databases below Chapter 10

Stores data in tables that consist of rows and columns Each row has primary key Each column has unique name

Stores data relationships Uses specialized terminology

DATA TERMINOLOGY

Page 33: Tutorial 10

Relational, Object-Oriented, and Multidimensional Databases

What is a relationship?

p. 10.21 Fig. 10-20 Next

Connection within data

Click to view animation

Page 34: Tutorial 10

Relational, Object-Oriented, and Multidimensional Databases

What is Structured Query Language (SQL)?

p. 10.22 Fig. 10-21 Next

Click to view Web Link,then click SQL below Chapter 10

Allows you to manage, update, and retrieve data Has special keywords and rules included in SQL

statementsSQL statement

SQL statement results

Page 35: Tutorial 10

Relational, Object-Oriented, and Multidimensional Databases

What is an object-oriented database (OODB)?

p. 10.22 Next

Click to view Web Link,then click Object-Oriented Databases below Chapter 10

Advantages

Often uses object query language (OQL)

Stores data in objectsObject is item that contains data, as well as actions that read or process data

Can store more types of dataCan access data faster

Page 36: Tutorial 10

Relational, Object-Oriented, and Multidimensional Databases

What are examples of applications appropriate for an object-oriented database?

p. 10.22 Next

Multimedia databasesMultimedia databases

Store images, audio clips, and/or video clips

Store images, audio clips, and/or video clips

Groupware databasesGroupware databases

Store documents such as schedules, calendars, manuals,

memos, and reports

Store documents such as schedules, calendars, manuals,

memos, and reportsComputer-aided design (CAD) databasesComputer-aided design (CAD) databases

Store data about engineering, architectural,

and scientific designs

Store data about engineering, architectural,

and scientific designs

Hypertext databasesHypertext databases

Contain text links to other documentsContain text links to other documents

Hypermedia databasesHypermedia databases

Contain text, graphics, video, and sound

Contain text, graphics, video, and sound

Web databasesWeb databases

Link to e-form on Web pageLink to e-form on Web page

Page 37: Tutorial 10

What is a multidimensional database?

Relational, Object-Oriented, and Multidimensional Databases

p. 10.23 Next

Click to view Web Link,then click Multidimensional Databases below Chapter 10

Stores data in dimensions

Multiple dimensions, also called hypercube, allow users to analyze any view of data

Can consolidate data much faster than relational database

Page 38: Tutorial 10

Relational, Object-Oriented, and Multidimensional Databases

What is a data warehouse?

p. 10.24 Next

Click to view Web Link,then click Data Warehouses below Chapter 10

Data mart is smaller version of data warehouse

Uses multidimensional databases

Often uses a process called data mining to find patterns and relationships among data

Huge database system that stores and manages data required to analyze historical and current transactions

Quick and efficient way to access large amounts of data

Page 39: Tutorial 10

Web Databases

What is a Web database?

p. 10.24 Fig. 10-23 Next

Database you access through the Web by filling in a form on a Web page

Usually resides on a database server, a computer that stores and provides access to a database

Click to view video

Page 40: Tutorial 10

Web Databases

How might a search engine interact with a Web database?

p. 10.25 Fig. 10-24 Next

Step 1. Browser sends search text to Web server.

Step 2. Web server sends search text through a CGI script to database. Database retrieves list of hits that contains search text and sends it through CGI script back to Web server.

Step 3. Web server sends list of hits to browser.

Click to view video

Page 41: Tutorial 10

3. Design the fields for each table2. Design the tables

1. Determine the purpose of the database1. Determine the purpose of the database

4. Determine the relationships among the tables

4. Determine the relationships among the tables

Design tables on paper first Each table should contain

data about one subject

Database Administration

What are guidelines for developing a database?

p. 10.26 Next

Be sure every field has a unique primary key

Use separate fields for logically distinct items

Do not create fields for information that can be derived from entries in other fields

Allow enough space for each field Set default values for frequently

entered data

Page 42: Tutorial 10

Database Administration

What is the role of the database analyst and administrator?

p. 10.27 Next

Click to view Web Link,then click Database Administrators below Chapter 10

Database analyst (DA)Database analyst (DA) Database administrator (DBA)Database administrator (DBA) Focuses on meaning and

usage of data Decides proper placement

of fields, defines relationships, and identifies users’ access privileges

Creates and maintains data dictionary, manages database security, monitors database performance, and checks backup and recovery procedures

Page 43: Tutorial 10

Summary of Database Management

Chapter 10 Complete

How data and information are valuable assets to an organization

How data and information are valuable assets to an organization

Methods for maintaining high-quality data

Methods for maintaining high-quality data

Assessing the quality of valuable information

Assessing the quality of valuable information

Advantages of organizing data in a database

Advantages of organizing data in a database

Various types of databasesVarious types of databases

Role of the database analysts and administrators

Role of the database analysts and administrators