39
Chapter 9 The Database and Database The Database and Database Management System Management System MANAGEMENT INFORMATION SYSTEMS 8/E Raymond McLeod, Jr. and George Schell yright 2001 Prentice-Hall, Inc. 9-1

Bahan Insisiasi 1minggu ke2 3 DBMS

Embed Size (px)

Citation preview

Chapter 9The Database and Database The Database and Database

Management SystemManagement System

MANAGEMENT INFORMATION SYSTEMS 8/ERaymond McLeod, Jr. and George Schell

Copyright 2001 Prentice-Hall, Inc.9-1

Data OrganizationData Organization Data FieldData Field

– Smallest unit of dataSmallest unit of data RecordRecord

– Collection of related fieldsCollection of related fields FileFile

– Collection of related recordsCollection of related records

9-2

Data Organization Data Organization (cont.)(cont.)

FoldersFolders– Collection of related filesCollection of related files– Conceptually similar to a branch Conceptually similar to a branch of the treeof the tree

SubfolderSubfolder– A folder within a folderA folder within a folder

Movement of folders using GUIMovement of folders using GUI

9-3

Organization of Data Organization of Data into Foldersinto Folders

9-4

Common Models for Common Models for Organizing Data FilesOrganizing Data Files

1. Function2. Frequency of Use3. Users4. Projects

9-5

Fundamental Building Fundamental Building Blocks for Database Blocks for Database

StructuresStructures

1. Data Value2. Data Field3. Data Record4. Data File

9-6

Spreadsheet as a Spreadsheet as a Simple DatabaseSimple Database

Rows and columns of a spreadsheet Rows and columns of a spreadsheet can be regarded as a simple databasecan be regarded as a simple database

Flat filesFlat files– Does not have repeating columnsDoes not have repeating columns– Spreadsheet table is a file and column Spreadsheet table is a file and column is a fieldis a field

Key fieldsKey fields– Contains a value to uniquely identify Contains a value to uniquely identify each record in a tableeach record in a table

9-7

Data Structure vs. Data Structure vs. Spreadsheet Spreadsheet TerminologyTerminology

Spreadsheet Term Data Structure Term

Table FileColumn FieldRow Record

9-8

Database StructuresDatabase Structures DatabaseDatabase

– All data stored on computer-based All data stored on computer-based resources of the organizationresources of the organization

Database Management System (DBMS)Database Management System (DBMS)– Software application that stores the Software application that stores the structure of the database, the data structure of the database, the data itself, relationships among the data itself, relationships among the data in the database, as well as forms and in the database, as well as forms and reports pertaining to the databasereports pertaining to the database

9-9

Database Structures Database Structures (cont.)(cont.) Hierarchical structure Hierarchical structure

– Uses the ‘parent / children’ conceptUses the ‘parent / children’ concept– Limitation: Cannot handle ad hoc requestsLimitation: Cannot handle ad hoc requests– First DBMS was IDS by GE in 1964First DBMS was IDS by GE in 1964– CODASYLCODASYL

Network structureNetwork structure– Allow given record to point back to any other Allow given record to point back to any other record in the databaserecord in the database

– Specification released by CODASYL in 1971Specification released by CODASYL in 1971– Solves problem of having to backtrack through Solves problem of having to backtrack through datadata

9-10

Database Structures Database Structures (cont.)(cont.)

Relational structureRelational structure– Rows and columnsRows and columns– Frees designers from need to specify Frees designers from need to specify relationships prior to building the relationships prior to building the databasedatabase

– Date and Codd described structureDate and Codd described structure– Does not rely on physical relationshipsDoes not rely on physical relationships– Easy to understandEasy to understand

9-11

Relational Database Relational Database VendorsVendors

1. IBM2. Informix Software, Inc.3. Microsoft4. Oracle5. Sybase

9-12

The Database ConceptThe Database Concept Database conceptDatabase concept

– Logical integration of records in Logical integration of records in multiple files multiple files

Data redundancyData redundancy– Duplication of dataDuplication of data

Data inconsistencyData inconsistency Data independenceData independence

– Keep data specifications separate from Keep data specifications separate from programs, in tables and indexesprograms, in tables and indexes

9-13

TablesTablesBook Name Author Required

Banking Principles Knox 25Management Information Systems 8E McLeod and Schell 75 Personal Sales Techniques Wei 70Quality Service, Quality Customer Brutus 54

9-14

Description of Book Description of Book TableTable

9-15

Description of Student Description of Student TableTable

9-16

Table RelationshipsTable Relationships

9-17

Salespersonfile

Salesstatisticsfile

Customerfile

Accountsreceivable

file

Buyer file

Inventory file

Vendor file

Accounts payable file

Purchase order file

General ledger file

A Database Consists of One or More Files

9-18

Evolution of Database Evolution of Database SoftwareSoftware

GE’s IDS first exampleGE’s IDS first example– Used with COBOLUsed with COBOL

IBM’s IMSIBM’s IMS– Apollo projectApollo project

Interface IssuesInterface Issues– Intel’s System 2000, RAMIS, IDMS, Intel’s System 2000, RAMIS, IDMS, InquireInquire

– Query language interfaceQuery language interface9-19

Evolution of Database Evolution of Database Software (cont.)Software (cont.)

SEQEL from IBMSEQEL from IBM– Continuation of IMSContinuation of IMS

Renamed SQLRenamed SQL– Structured Query language Structured Query language – Embedded within traditional languageEmbedded within traditional language– StandaloneStandalone

PC database packagesPC database packages– dBase IIdBase II– MS-Access MS-Access

9-20

Creating a DatabaseCreating a Database Two approaches:Two approaches:

1. Process oriented approach 1. Process oriented approach (problem-solving)(problem-solving)

2.2. Enterprise modelingEnterprise modeling

9-21

DefineDefinethe Problemthe Problem

Identify Identify necessarynecessarydecisionsdecisions

DescribeDescribeinformation information

needsneeds

DetermineDeterminethe necessarythe necessaryprocessingprocessing

SpecifySpecifydata needsdata needs

1.1.

2.2.

3.3.

4.4.

5.5.

6.6.

Data NeedsData NeedsCan BeCan BeDefined by Defined by Taking a Taking a Problem-Problem-Oriented Oriented ApproachApproach

DataDataSpecificationsSpecifications

9-22

Createenterprisedata model

DevelopDatabase

Database

2.

1.

Strategic Planning for Information Resources

Data Needs CanBe Defined by Creating an Enterprise

Model

EnterpriseData Model

9-23

Describing the Database Describing the Database ContentsContents

Data dictionary

Enterdictionary

dataData descriptionlanguage (DDL)

Schema

Step 1

Step 2

9-24

SchemaSchema Data field nameData field name Aliases (other names used for Aliases (other names used for same data field)same data field)

Type of data (numeric Type of data (numeric alphabetic)alphabetic)

Number of positionsNumber of positions Number of decimal positionsNumber of decimal positions Various integrity rulesVarious integrity rules

9-25

Rule for Required Rule for Required FieldField

9-26

Enforcing Value of Enforcing Value of BookNameBookName

9-27

Creating a DatabaseCreating a Database 1) Describe the data1) Describe the data 2) Enter the data2) Enter the data 3) Use the database3) Use the database

– Query languageQuery language– Query-by-exampleQuery-by-example– Data manipulation language (DML)Data manipulation language (DML)

9-28

Query-by-ExampleQuery-by-Example

9-29

On-Line Analytical On-Line Analytical Processing (OLAP)Processing (OLAP)

Feature to enable data Feature to enable data analysis similar to analysis similar to statistical cross-tabulationstatistical cross-tabulation

Information can be generated Information can be generated from within DBMSfrom within DBMS

No need for separate No need for separate statistical softwarestatistical software

9-30

Example OLAP OutputExample OLAP Output Marital Status Married Single Cash $752 $849Payment Credit $1,277 $2,019Method Check $283 $165

9-31

The Database The Database Administrator (DBA)Administrator (DBA)D B A DutiesD B A Duties Database planning; work with Database planning; work with users and others, define schema, users and others, define schema, etc.etc.

Database implementation; creating Database implementation; creating the database and enforcing the database and enforcing policies and procedurespolicies and procedures

Database operationsDatabase operations Database securityDatabase security

9-32

DataDatadescriptiondescriptionlanguagelanguageprocessorprocessor

Database managerDatabase manager QueryQuerylanguagelanguage

Data Data manipulationmanipulation

language (DML)language (DML)

Application Application programsprograms

DatabaseDatabasedescriptidescripti

on on (schema)(schema)

DatabaseDatabase

InformationInformation requests requests

InformationInformation

TransactionTransaction loglog

Backup/recoveryBackup/recoverymodulemodule

PerformancPerformancee

statisticsstatistics

PerformancePerformance

statisticsstatistics

processorprocessor

PerformancePerformance statisticsstatistics

A DBMSA DBMSModelModel

9-33

Knowledge Discovery in Knowledge Discovery in Databases (KDD)Databases (KDD)

Data warehousingData warehousing– refinement in the database concept refinement in the database concept to make itto make it» very largevery large» very purevery pure» very retrievablevery retrievable

Data martData mart– a more modest approach than data a more modest approach than data warehousing, generally only one warehousing, generally only one segment of the firmsegment of the firm

9-34

Knowledge Discovery in Knowledge Discovery in Databases (KDD) Databases (KDD)

(cont.)(cont.) Data miningData mining

– the process of finding the process of finding relationships in data that are relationships in data that are unknown to the userunknown to the user

– may be formay be for» verificationverification» discoverydiscovery» combination of verification and combination of verification and discoverydiscovery

9-35

The Knowledge The Knowledge Discovery in Database Discovery in Database

(KDD) Process(KDD) Process1. Define the data and the task1. Define the data and the task2. Acquire the data2. Acquire the data3. Clean the data3. Clean the data4. Develop the hypothesis and 4. Develop the hypothesis and search modelsearch model

5. Mine the data5. Mine the data6. Test and verify6. Test and verify7. Interpret and use7. Interpret and use

9-36

DBMS AdvantagesDBMS Advantages Reduce data redundancyReduce data redundancy Achieve data independenceAchieve data independence Enable integration of data Enable integration of data from multiple filesfrom multiple files

Retrieve data and information Retrieve data and information quicklyquickly

Improve securityImprove security9-37

DBMS DisadvantagesDBMS Disadvantages

Obtain expensive softwareObtain expensive software Obtain a large hardware Obtain a large hardware configurationconfiguration

Hire and maintain a DBA staffHire and maintain a DBA staff

9-38

Requires a firm to:

SummarySummary Organizations are storing vast Organizations are storing vast amounts of dataamounts of data

Organization and structures in Organization and structures in databasedatabase– Dominated by relationalDominated by relational

Staff positionsStaff positions– DBADBA

Knowledge discovery in databasesKnowledge discovery in databases Database management systemsDatabase management systems

9-39