+ All Categories
Home > Documents > Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

Date post: 20-Dec-2015
Category:
View: 213 times
Download: 0 times
Share this document with a friend
Popular Tags:
27
1 Jerry Post Copyright © 2001 Database Management Database Management Systems Systems Chapter 1 Introduction
Transcript
Page 1: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

1

Jerry PostCopyright © 2001

Database Management Database Management SystemsSystems

Chapter 1

Introduction

Page 2: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

2

DDAATTAABBAASSEE

Goal: Build a Business Application

Tools:Database DesignSQL (queries)Programming

Des

ign

SQ

L

Pro

gram

Des

ign

SQ

L

Pro

gram

Best:Spend your timeon design and SQL.

Worst:Compensate for poor designand limited SQL with programming.

Page 3: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

3

DDAATTAABBAASSEE

DBMS: Database Management System

DatabaseA collection of data stored in a standardized format,

designed to be shared by multiple users.

Database Management SystemSoftware that defines a database, stores the data, supports

a query language, produces reports, and creates data entry screens.

Page 4: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

4

DDAATTAABBAASSEE

Drawbacks of old File methods

Uncontrolled DuplicationWastes spaceHard to update all files

Inconsistent data Inflexibility

Hard to change dataHard to change programs

Limited data sharing Poor enforcement of standards Poor programmer productivity Excessive program maintenance

Page 5: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

5

DDAATTAABBAASSEE

File Method Problems

Files defined in programCannot read file without

definitionHard to find definitionEvery time you alter file,

you must rewrite codeChange in a program/file

will crash other codeCannot tell which

programs use each file

Multiuser problemsConcurrencySecurity

AccessBackup & Restore

Efficiency IndexesProgrammer talent

System Application

Page 6: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

6

DDAATTAABBAASSEE

Old File Method/3GL

Data Definition File 1 … File 2 …

Data Definition File A File 2 File C …

Pay History

Benefits

Employee

EmployeeChoices

FilesProgramsPayroll

Benefits

Page 7: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

7

DDAATTAABBAASSEE

Example of File Method v DBMS

File Division01 Employees 02 ID 02 Name 02 Address

01 Department 02 ID 02 . . .

COBOL

112 Davy Jones 999 ElmStreet . . . 113 Peter Smith101 Oak St . . .

Employee File

More programsFile Division01 Employees...

Add to file (e.g.Cell phone)Write code to copy employee file

and add empty cell phone slot.Find all programs that use

employee file.Modify file definitions.Modify reports (as needed)Recompile, fix new bugs.

Easier: Keep two employee files?

02 Cell Phone

Page 8: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

8

DDAATTAABBAASSEE

Advantages of Database Approach

Minimal data redundancy. Data consistency. Integration of data. Sharing of data. Enforcement of standards. Ease of application development. Uniform security, privacy and integrity. Data independence.

Page 9: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

9

DDAATTAABBAASSEE

Database Management Approach Data is most important

Data defined firstStandard format

Access DB through DBMSQueries, Reports, FormsApplication Programs3GL Interface

Data independenceChange data definition

without changing codeAlter code without

changing dataMove/split data without

changing code

All Data

DBMS

Program1 Program2QueriesReports

Page 10: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

10

DDAATTAABBAASSEE

Modifying Data with DBMS

Add cell number to employee tableOpen table definitionAdd data element If desired, modify reports

Use report writerNo programming

Existing reports, queries, code will all run as before with no changes.

Field Name Data Type Description

EmployeeID Number Autonumber..TaxpayerID Text Federal IDLastName TextFirstName Text . . . Phone Text . . .

CellPhone Text Cellular . . .

Page 11: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

11

DDAATTAABBAASSEE

DBMS Features/Components Database engine

StorageRetrievalUpdate

Query Processor Data dictionary Utilities Security

Report writer Forms generator (input

screens) Application generator Communications 3GL Interface

Page 12: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

12

DDAATTAABBAASSEE

DBMS Engine, Security, Utilities

DataTables

DatabaseEngine

ProductItemID Description887 Dog food946 Cat food

OrderOrderID ODate9874 3-3-979888 3-9-97

CustomerCustomerID Name1195 Jones2355 Rojas

ProductItemID Integer, UniqueDescription Text, 100 charCustomerCustomerID Integer, UniqueName Text, 50 char

SecurityUser IdentificationAccess Rights

Utilities

Concurrency andLock Manager

Backup andRecovery

Administration

DataDictionary

Page 13: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

13

DDAATTAABBAASSEE

Database Tables (Access)

Page 14: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

14

DDAATTAABBAASSEE

Database Tables (Oracle)

Page 15: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

15

DDAATTAABBAASSEE

DBMS Query ProcessorAll Data

Database EngineData Dictionary

Query Processor

Page 16: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

16

DDAATTAABBAASSEE

DBMS Report WriterAll Data

Database EngineData Dictionary

Query Processor

Report Writer

ReportFormat

and Query

Page 17: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

17

DDAATTAABBAASSEE

Report Writer (Oracle)

Page 18: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

18

DDAATTAABBAASSEE

DBMS Input FormsAll Data

Database EngineData Dictionary

Query Processor

Form Builder

InputForm

Design

Page 19: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

19

DDAATTAABBAASSEE

DBMS Components

All Data

Database EngineData Dictionary

Security

Query Processor

FormBuilder

ReportWriter

CommunicationNetwork

3GLConnector

Program

ApplicationGenerator

Page 20: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

20

DDAATTAABBAASSEE

Examples of Commercial Systems

Oracle Ingres Informix (Unix) DB2, SQL/DS (IBM) Access (Microsoft) SQL Server (Microsoft +) Many older (Focus, IMS, ...) Many limited PC (dBASE, Paradox, …)

Page 21: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

21

DDAATTAABBAASSEE

Hierarchical DatabaseCustomers

Orders

Item Description Quantity998 Dog Food 12764 Cat Food 11

Items

Customer

Order

Items Ordered

To retrieve data, you must start at the top (customer). When you retrieve a customer, you retrieve all nested data.

Page 22: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

22

DDAATTAABBAASSEE

Network Database

Customer

OrderItems

Ordered

Items

Entry point

Entry point

Page 23: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

23

DDAATTAABBAASSEE

Relational Database

Customer(CustomerID, Name, …

Order(OrderID, CustomerID, OrderDate, …

ItemsOrdered(OrderID, ItemID, Quantity, …

Items(ItemID, Description, Price, …

Page 24: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

24

DDAATTAABBAASSEE

Object-Oriented DBMSCustomer

CustomerIDName… Add CustomerDrop CustomerChange Address

OrderOrderIDCustomerID… NewOrderDeleteOrder…

OrderItemOrderIDItemID… OrderItemDropOrderItem…

ItemItemIDDescription… New ItemSell ItemBuy Item …

GovernmentCustomer

ContactNameContactPhoneDiscount, …

NewContact

CommercialCustomer

ContactNameContactPhone…

NewContact

Page 25: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

25

DDAATTAABBAASSEE

Why don’t all developers use a DBMS?

Most new projects (in last 5 years) do use a DBMS Need specialized personnel

ProgrammersDesigners/AnalystsDatabase administrators

Need to define data for organization Cost

PC: $400 - $2000Large: $100,000 +

Page 26: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

26

DDAATTAABBAASSEE

Application development

Modeling data – ch 2 and 3 User interface design (forms and reports) – ch 4,5,6. Operational design – ch 7 and 8. DB tuning – ch 9. DB admin and security – ch 10. Distributed DB – ch11.

Page 27: Jerry Post Copyright © 2001 1 Database Management Systems Chapter 1 Introduction.

27

DDAATTAABBAASSEE

Building the Right System: Feasibility Costs

Up-front/one-time Software ($ millions !) Hardware Communications Data conversion Studies and Design Training

On-going costs Personnel Software upgrades Supplies Support Software & Hardware

maintenance

Benefits Cost Savings

Software maintenance Fewer errors Less data maintenance Less user training

Increased Value Better access to data Better decisions Better communication More timely reports Faster reaction to change New products & services

Strategic Advantages Lock out competitors

Easy to estimate Hard to value


Recommended