© 2009 pearson education, inc. publishing as prentice hall 1 unit 1: background and terminology...

47
© 2009 Pearson Education, Inc. Publishing as © 2009 Pearson Education, Inc. Publishing as Prentice Hall Prentice Hall 1 Unit 1: Unit 1: Background and Background and Terminology Terminology Chapters 1 + 2: Chapters 1 + 2: Modern Database Management Modern Database Management 9 9 th th Edition Edition Jeffrey A. Hoffer, Mary B. Prescott, Jeffrey A. Hoffer, Mary B. Prescott, Heikki Topi Heikki Topi

Upload: osborne-lamb

Post on 02-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

© 2009 Pearson Education, Inc.  Publishing as © 2009 Pearson Education, Inc.  Publishing as Prentice HallPrentice Hall 11

Unit 1:Unit 1:Background and Background and

TerminologyTerminology

Chapters 1 + 2:Chapters 1 + 2:

Modern Database Modern Database ManagementManagement

99thth Edition EditionJeffrey A. Hoffer, Mary B. Prescott, Jeffrey A. Hoffer, Mary B. Prescott,

Heikki TopiHeikki Topi

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 22

DefinitionsDefinitions Database: organized collection of logically Database: organized collection of logically

related datarelated data Data: stored representations of meaningful Data: stored representations of meaningful

objects and eventsobjects and events Structured: numbers, text, datesStructured: numbers, text, dates Unstructured: images, video, documentsUnstructured: images, video, documents

Information: data processed to increase Information: data processed to increase knowledge in the person using the dataknowledge in the person using the data

Metadata: data that describes the properties Metadata: data that describes the properties and context of user dataand context of user data

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 33

Figure 1-1a Data in context

Context helps users understand data

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 44

Graphical displays turn data into useful information that managers can use for decision making and

interpretation

Figure 1-1b Summarized data

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 55

Descriptions of the properties or characteristics of the data, including data types, field sizes, allowable values, and

data context

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 66

Data CharacteristicsData CharacteristicsStatus vs. Event DataStatus vs. Event Data

Status

Status

Event = a database action

(create/update/delete) that results from a

transaction

Figure 11-6 Example of DBMS

log entry

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 77

Data CharacteristicsData CharacteristicsTransient vs. Periodic DataTransient vs. Periodic Data

With transient

data, changes

to existing records

are written

over previous records,

thus destroyi

ng the previous

data content

Figure 11-7 Transient

operational data

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 88

Periodic data are

never physicall

y altered

or deleted

once they have been

added to the store

Data CharacteristicsData CharacteristicsTransient vs. Periodic DataTransient vs. Periodic Data

Figure 11-8 Periodic

warehouse data

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 99

Derived DataDerived Data Data that can be computed as opposed Data that can be computed as opposed

to stored facts.to stored facts. ObjectivesObjectives

Ease of use for decision support applicationsEase of use for decision support applications Fast response to predefined user queriesFast response to predefined user queries Customized data for particular target Customized data for particular target

audiencesaudiences Ad-hoc query supportAd-hoc query support Data mining capabilitiesData mining capabilities

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall1010

Duplicate Data

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 1111

Disadvantages of File Disadvantages of File ProcessingProcessing

Program-Data DependenceProgram-Data Dependence All programs maintain metadata for each file they useAll programs maintain metadata for each file they use

Duplication of DataDuplication of Data Different systems/programs have separate copies of the Different systems/programs have separate copies of the

same datasame data

Limited Data SharingLimited Data Sharing No centralized control of dataNo centralized control of data

Lengthy Development TimesLengthy Development Times Programmers must design their own file formatsProgrammers must design their own file formats

Excessive Program MaintenanceExcessive Program Maintenance 80% of information systems budget80% of information systems budget

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 1212

Problems with Data Problems with Data DependencyDependency

Each application programmer must Each application programmer must maintain his/her own datamaintain his/her own data

Each application program needs to Each application program needs to include code for the metadata of each include code for the metadata of each filefile

Each application program must have its Each application program must have its own processing routines for reading, own processing routines for reading, inserting, updating, and deleting datainserting, updating, and deleting data

Lack of coordination and central controlLack of coordination and central control Non-standard file formatsNon-standard file formats

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 1313

Problems with Data Problems with Data RedundancyRedundancy

Waste of space to have duplicate dataWaste of space to have duplicate data Causes more maintenance headachesCauses more maintenance headaches The biggest problem: The biggest problem:

Data changes in one file could cause Data changes in one file could cause inconsistenciesinconsistencies

Compromises in Compromises in data integritydata integrity

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 1414

SOLUTION: SOLUTION: The DATABASE ApproachThe DATABASE Approach

Central repository of shared dataCentral repository of shared data Data is managed by a controlling Data is managed by a controlling

agentagent Stored in a standardized, Stored in a standardized,

convenient formconvenient form

Requires a Database Management System (DBMS)

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 1515

Database Management Database Management SystemSystem

DBMS manages data resources like an operating system manages hardware resources

A software system that is used to create, maintain, and provide controlled access to user databases

Order Filing System

Invoicing System

Payroll System

DBMSCentral database

Contains employee,order, inventory,

pricing, and customer data

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 1616

Advantages of the Database Advantages of the Database ApproachApproach

Program-data independenceProgram-data independence Planned data redundancyPlanned data redundancy Improved data consistencyImproved data consistency Improved data sharingImproved data sharing Increased application development Increased application development

productivityproductivity Enforcement of standardsEnforcement of standards Improved data qualityImproved data quality Improved data accessibility and Improved data accessibility and

responsivenessresponsiveness Reduced program maintenanceReduced program maintenance Improved decision supportImproved decision support

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 1717

Costs and Risks of the Database Costs and Risks of the Database ApproachApproach

New, specialized personnelNew, specialized personnel Installation and management cost Installation and management cost

and complexityand complexity Conversion costsConversion costs Need for explicit backup and Need for explicit backup and

recoveryrecovery Organizational conflictOrganizational conflict

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 1818

Elements of the Database Elements of the Database ApproachApproach

Data models Data models Graphical system capturing nature and relationship of dataGraphical system capturing nature and relationship of data Enterprise Data Model–high-level entities and relationships Enterprise Data Model–high-level entities and relationships

for the organizationfor the organization Project Data Model–more detailed view, matching data Project Data Model–more detailed view, matching data

structure in database or data warehouse structure in database or data warehouse Relational DatabasesRelational Databases

Database technology involving tables (relations) Database technology involving tables (relations) representing entities and primary/foreign keys representing entities and primary/foreign keys representing relationshipsrepresenting relationships

Use of Internet TechnologyUse of Internet Technology Networks and telecommunications, distributed databases, Networks and telecommunications, distributed databases,

client-server, and 3-tier architecturesclient-server, and 3-tier architectures Database ApplicationsDatabase Applications

Application programs used to perform database activities Application programs used to perform database activities (create, read, update, and delete) for database users(create, read, update, and delete) for database users

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 1919

Figure 1-5 Components of the Database Environment

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 2020

Components of the Components of the Database EnvironmentDatabase Environment

CASE ToolsCASE Tools––computer-aided software engineeringcomputer-aided software engineering RepositoryRepository––centralized storehouse of metadatacentralized storehouse of metadata Database Management System (DBMS) Database Management System (DBMS) ––

software for managing the databasesoftware for managing the database DatabaseDatabase––storehouse of the datastorehouse of the data Application ProgramsApplication Programs––software using the datasoftware using the data User InterfaceUser Interface––text and graphical displays to text and graphical displays to

usersusers Data/Database AdministratorsData/Database Administrators––personnel personnel

responsible for maintaining the databaseresponsible for maintaining the database System DevelopersSystem Developers––personnel responsible for personnel responsible for

designing databases and softwaredesigning databases and software End UsersEnd Users––people who use the applications and people who use the applications and

databasesdatabases

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 2121

The Range of Database The Range of Database ApplicationsApplications

Personal databasesPersonal databases Workgroup databasesWorkgroup databases Departmental/divisional databasesDepartmental/divisional databases Enterprise databaseEnterprise database

Enterprise resource planning (ERP) Enterprise resource planning (ERP) systemssystems

Data warehousing implementationsData warehousing implementations

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 2222

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 2323

Figure 1-7 Workgroup database with wireless local area network

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 2424

Enterprise Database Enterprise Database ApplicationsApplications

Enterprise Resource Planning (ERP)Enterprise Resource Planning (ERP) Integrate all enterprise functions Integrate all enterprise functions

(manufacturing, finance, sales, marketing, (manufacturing, finance, sales, marketing, inventory, accounting, human resources)inventory, accounting, human resources)

Data WarehouseData Warehouse Integrated decision support system derived Integrated decision support system derived

from various operational databasesfrom various operational databases

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 2525

Data WarehousingData Warehousing Data WarehouseData Warehouse: :

A subject-oriented, integrated, time-variant, non-A subject-oriented, integrated, time-variant, non-updatable collection of data used in support of updatable collection of data used in support of management decision-making processesmanagement decision-making processes

Subject-oriented:Subject-oriented: e.g. customers, patients, e.g. customers, patients, students, productsstudents, products

Integrated: Integrated: Consistent naming conventions, Consistent naming conventions, formats, encoding structures; from multiple data formats, encoding structures; from multiple data sourcessources

Time-variant: Time-variant: Can study trends and changesCan study trends and changes Non-updatable: Non-updatable: Read-only, periodically refreshedRead-only, periodically refreshed

Data MartData Mart:: A data warehouse that is limited in scopeA data warehouse that is limited in scope

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 2626

Need for Data WarehousingNeed for Data Warehousing Integrated, company-wide view of high-quality Integrated, company-wide view of high-quality

information (from disparate databases)information (from disparate databases) Separation of Separation of operationaloperational and and informationalinformational

systems and data (for improved performance)systems and data (for improved performance)Table 11-1 – Comparison of Operational and Informational Systems

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 2727

Figure 1-8 An enterprise data warehouse

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 2828

Figure 11-2 Independent data mart data warehousing architecture

Data marts:Data marts:Mini-warehouses, limited in scope

E

T

L

Separate ETL for each independent data mart

Data access complexity due to multiple data marts

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 2929

Figure 11-3 Dependent data mart with operational data store: a three-level architecture

ET

L

Single ETL for enterprise data warehouse (EDW)(EDW)

Simpler data access

ODS ODS provides option for obtaining current data

Dependent data marts loaded from EDW

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 3030

E

T

L

Near real-time ETL for Data WarehouseData Warehouse

ODS ODS and data warehousedata warehouse are one and the same

Data marts are NOT separate databases, but logical views of the data warehouse

Easier to create new data marts

Figure 11-4 Logical data mart and real time warehouse architecture

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 3131

Application Logic in C/S Application Logic in C/S SystemsSystems

GUI Interface

Procedures, functions,programs

DBMS activities

Processing LogicProcessing Logic I/O processingI/O processing Business rulesBusiness rules Data managementData management

Storage LogicStorage Logic Data storage/retrievalData storage/retrieval

Presentation LogicPresentation Logic Input–keyboard/mouseInput–keyboard/mouse Output–monitor/printerOutput–monitor/printer

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 3232

Client/Server ArchitecturesClient/Server Architectures

File Server ArchitectureFile Server Architecture

Database Server ArchitectureDatabase Server Architecture

Three-tier ArchitectureThree-tier Architecture

Client does extensive processing

Client does little processing

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 3333

File Server ArchitectureFile Server Architecture

All processing is done at the PC that All processing is done at the PC that requested the data requested the data

Entire files are transferred from the server Entire files are transferred from the server to the client for processingto the client for processing

Problems:Problems: Huge amount of data transfer on the networkHuge amount of data transfer on the network Each client must contain full DBMS Each client must contain full DBMS

Heavy resource demand on clientsHeavy resource demand on clients Client DBMSs must recognize shared locks, integrity Client DBMSs must recognize shared locks, integrity

checks, etc.checks, etc.

FAT FAT CLIENTCLIENT

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 3434

Figure 9-2 File server model

FAT FAT CLIENTCLIENT

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 3535

Two-Tier Database Server Two-Tier Database Server ArchitecturesArchitectures

Client is responsible for Client is responsible for I/O processing logic I/O processing logic Some business rules logicSome business rules logic

Server performs all data storage Server performs all data storage and access processing and access processing DBMS is only on serverDBMS is only on server

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 3636

Three-Tier ArchitecturesThree-Tier Architectures

Thin Client PC just for user interface and a little application

processing. Limited or no data storage (sometimes no hard drive)

GUI interface (I/O processing)

Browser

Business rules Web Server

Data storage DBMS

ClientClient

Application serverApplication server

Database serverDatabase server

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 3737

Figure 9-4a Generic three-tier architecture

Thinnest Thinnest clientsclients

Business rules Business rules on separate on separate

serverserver

DBMS only DBMS only on DB serveron DB server

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall3838

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 3939

Common Logic Common Logic DistributionsDistributions

Figure 9-5a Two-tier client-server environments

Figure 9-5b n-tier client-server environment

Processing logic could be at client, server, or both

Processing logic will be at

application server or Web server

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 4040

MiddlewareMiddleware

Software that allows an application Software that allows an application to to interoperateinteroperate with other software with other software

No need for programmer/user to No need for programmer/user to understand internal processingunderstand internal processing

Accomplished via Accomplished via Application Application Program InterfaceProgram Interface (API)(API)

The “glue”“glue” that holds client/server applications together

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 4141

Web-Enabled DatabasesWeb-Enabled Databases

Web applications requiring databasesWeb applications requiring databases Customer relationship management Customer relationship management

(CRM)(CRM) Business-to-consumer (B2C)Business-to-consumer (B2C) Electronic data interchange (EDI)Electronic data interchange (EDI) Private intranetsPrivate intranets XML-defined Web servicesXML-defined Web services

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 4242

Web-Enabled Databases Web-Enabled Databases (cont.)(cont.)

Issues to considerIssues to consider Which technologies to use?Which technologies to use? Security/privacy protectionSecurity/privacy protection Managing huge volumes of data from Managing huge volumes of data from

Internet transactionsInternet transactions Maintaining data qualityMaintaining data quality

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 4343

Figure 10-1 Database-enabled intranet/internet environment

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 4444

Server-Side ExtensionsServer-Side Extensions Programs that interact directly with Web Programs that interact directly with Web

servers to handle requestsservers to handle requests e.g. database-request handling middlewaree.g. database-request handling middleware

Figure 10-2 Web-to-database middleware

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 4545

Figure 10-7 Web services deployment (adapted from Newcomer, 2002)

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 4646

Table 1-6 Summary of Database Applications

Chapter 1 © 2009 Pearson Education, Inc.  Publishing as Prentice Hall© 2009 Pearson Education, Inc.  Publishing as Prentice Hall 4747

All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic,

mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America.

Copyright © 2009 Pearson Education, Inc.  Publishing as Prentice Copyright © 2009 Pearson Education, Inc.  Publishing as Prentice HallHall