management information systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+dbms_mcleodch06.pdf · ©...

37
© 2007 by Prentice Hall © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell Management Information Systems, 10/e Raymond McLeod and George Schell 1 Management Management Information Systems, Information Systems, 10/e 10/e Raymond McLeod and George Schell Raymond McLeod and George Schell

Upload: others

Post on 08-Mar-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell Management Information Systems, 10/e Raymond McLeod and George Schell 11

Management Management Information Systems, Information Systems,

10/e10/eRaymond McLeod and George Schell Raymond McLeod and George Schell

Page 2: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell Management Information Systems, 10/e Raymond McLeod and George Schell 22

Chapter 6Chapter 6Database Management Systems Database Management Systems

Page 3: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 3

Learning ObjectivesLearning Objectives

► Understand the hierarchy of data.Understand the hierarchy of data.► Understand database structures and how they Understand database structures and how they

work.work.► Know how to relate tables together in a database.Know how to relate tables together in a database.► Recognize the difference between a database and Recognize the difference between a database and

a database management system.a database management system.► Understand the database concept.Understand the database concept.► Know two basic methods for determining data Know two basic methods for determining data

needs.needs.

Page 4: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 4

Learning Objectives (Cont’d)Learning Objectives (Cont’d)

► Understand entity-relationship diagrams and class Understand entity-relationship diagrams and class diagrams.diagrams.

► Know the basics of reports and forms.Know the basics of reports and forms.► Understand the basic difference between Understand the basic difference between

structured query language and query-by-example.structured query language and query-by-example.► Know about the important personnel who are Know about the important personnel who are

associated with databases.associated with databases.► Know the advantages and costs of database Know the advantages and costs of database

management systems.management systems.

Page 5: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 5

Data HierarchyData Hierarchy

►Data fieldData field is the smallest unit of data. is the smallest unit of data.►RecordRecord is a collection of related data fields. is a collection of related data fields.►FileFile is a collection of related records. is a collection of related records.►DatabaseDatabase is a collection of related files. is a collection of related files.

General definitionGeneral definition Restrictive definitionRestrictive definition

Page 6: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 6

DatabaseDatabase► Table of rows & columns can be represented in a Table of rows & columns can be represented in a

spreadsheet.spreadsheet.► Relational database structureRelational database structure is conceptually is conceptually

similar to a collection of related tables.similar to a collection of related tables.► Flat f i leFlat f i le is a table that does not have repeating is a table that does not have repeating

columns; 1columns; 1stst normal form. normal form.► NormalizationNormalization is a formal process for eliminating is a formal process for eliminating

redundant data fields which preserving the ability redundant data fields which preserving the ability of the database to add, delete, and modify records of the database to add, delete, and modify records without causing errors.without causing errors.

Page 7: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 7

Figure 6.1 Spreadsheet as a Simple Figure 6.1 Spreadsheet as a Simple DatabaseDatabase

Page 8: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 8

Database (Cont’d)Database (Cont’d)

► KeyKey in a table is a field (or combination of fields) in a table is a field (or combination of fields) that contain a value that uniquely identifies each that contain a value that uniquely identifies each record in the table.record in the table.

► Candidate keyCandidate key is a field that uniquely identifies is a field that uniquely identifies each table row but is not the chosen key.each table row but is not the chosen key.

► Relating tables is done through sharing a common Relating tables is done through sharing a common field & the value of the field determines which rows field & the value of the field determines which rows in the tables are logically joined.in the tables are logically joined.

Page 9: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 9

Database Management SystemDatabase Management System

►Database management system Database management system (DBMS)(DBMS) is a software application that is a software application that stores the structure of the database, the stores the structure of the database, the data itself, relationships among data in the data itself, relationships among data in the database, and forms & reports pertaining to database, and forms & reports pertaining to the database.the database. Self-describing set of related data.Self-describing set of related data.

Page 10: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 10

Database StructuresDatabase Structures

►HierarchicalHierarchical is formed by data groups, is formed by data groups, subgroups, and further subgroups; like subgroups, and further subgroups; like branches on a tree.branches on a tree. Worked well with TPSs.Worked well with TPSs. Utilized computer resources efficiently.Utilized computer resources efficiently.

►NetworkNetwork allows retrieval of specific allows retrieval of specific records; allows a given record to point to records; allows a given record to point to any other record in the database.any other record in the database.

Page 11: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 11

Figure 6.2 Hierarchical StructureFigure 6.2 Hierarchical Structure

Page 12: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 12

Database Structures (Cont’d)Database Structures (Cont’d)

►RelationalRelational is when the relationship is when the relationship between tables are implicit.between tables are implicit.

►Physical relationshipPhysical relationship is when the is when the database structure (hierarchical, network) database structure (hierarchical, network) rely on storage addresses.rely on storage addresses.

► Implicit relationshipImplicit relationship is when the is when the database structure (relational) can be database structure (relational) can be implied from the data. implied from the data.

Page 13: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 13

A Relational Database ExampleA Relational Database Example►A database named A database named ScheduleSchedule has been created has been created

from tables used earlier in the chapter and some from tables used earlier in the chapter and some othersothers

►The database is implemented in Microsoft The database is implemented in Microsoft Access 2002 (also known as Access XP).Access 2002 (also known as Access XP).

►Databases break information into multiple tables Databases break information into multiple tables because if information were stored in a single because if information were stored in a single table, many data field values would be table, many data field values would be duplicated.duplicated.

Page 14: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 14

ScheduleSchedule Database Database► The example is implemented on Microsoft Access DBMS but The example is implemented on Microsoft Access DBMS but

would be similar on any relational DBMS product.would be similar on any relational DBMS product. ► The COURSE table in Access (Figure 6.4) is a list of data field The COURSE table in Access (Figure 6.4) is a list of data field

values. The table itself had to be defined in Access before values values. The table itself had to be defined in Access before values were entered into the data fields. were entered into the data fields.

► Figure 6.5 shows the definition of the Figure 6.5 shows the definition of the CodeCode field. field.► Figure 6.6 illustrates that Figure 6.6 illustrates that AbbreviationAbbreviation field values will be field values will be

looked up from a list of values in the DEPARTMENT table.looked up from a list of values in the DEPARTMENT table.► Table 6.7 shows a single table of course and department fields Table 6.7 shows a single table of course and department fields

before they were separated into different tables.before they were separated into different tables.

Page 15: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 15

Figure 6.4 The COURSE TableFigure 6.4 The COURSE Table

Page 16: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 16

Figure 6.5 Defining the CODE FieldFigure 6.5 Defining the CODE Field

Page 17: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 17

Figure 6.6 Look-up ValuesFigure 6.6 Look-up Values

Page 18: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 18

Table 6.7Table 6.7

Page 19: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 19

Figure 6.7 Access ViewFigure 6.7 Access View

Page 20: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 20

Database ConceptDatabase Concept

► Database conceptDatabase concept is the logical integration of is the logical integration of records across multiple physical locations.records across multiple physical locations.

► Data independenceData independence is the ability to make is the ability to make changes in the data structure without making changes in the data structure without making changes to the application programs that access changes to the application programs that access the data.the data.

► Data dictionaryData dictionary includes the definition of the includes the definition of the data stored within the database & controlled by the data stored within the database & controlled by the database management system.database management system.

Page 21: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 21

Creating a DatabaseCreating a Database

►Determine data that needs to be collected & Determine data that needs to be collected & stored is a key step.stored is a key step.

►Process-oriented approachProcess-oriented approach Define the problem.Define the problem. Identify necessary decisions.Identify necessary decisions. Describe information needs.Describe information needs. Determine the necessary processing.Determine the necessary processing. Specify data needs. Specify data needs.

Page 22: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 22

Determine Data Needs (Cont’d)Determine Data Needs (Cont’d)

►Enterprise modeling approachEnterprise modeling approach takes a takes a broad view of the firm’s data resources; all broad view of the firm’s data resources; all areas are considered, & synergy of data areas are considered, & synergy of data resources between business areas can be resources between business areas can be leveraged.leveraged. Result: Result: Enterprise data modelEnterprise data model

Page 23: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 23

Figure 6.8 Enterprise Data ModelFigure 6.8 Enterprise Data Model

Page 24: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 24

Data Modeling TechniquesData Modeling Techniques►Entity-relationship diagrams (ERDs)Entity-relationship diagrams (ERDs)

is a graphical representation of data in is a graphical representation of data in entities and the relationships between entities and the relationships between entities.entities.

►EntityEntity is a conceptual collection of related is a conceptual collection of related data fields.data fields.

►RelationshipRelationship is defined between entities. is defined between entities. One-to-one – 1:1One-to-one – 1:1 One-to-many – 1:MOne-to-many – 1:M Many-to-many – M:NMany-to-many – M:N

Page 25: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 25

Figure 6.11 Entity-relationship Figure 6.11 Entity-relationship DiagramDiagram

Page 26: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 26

Diagramming Techniques (Cont’d)Diagramming Techniques (Cont’d)

►Class DiagramClass Diagram is a graphical is a graphical representation of both the data used in an representation of both the data used in an application and the actions associated with application and the actions associated with the data; object-oriented design modelthe data; object-oriented design model

►ObjectsObjects are the data, actions taken on the are the data, actions taken on the data, & relationship between objects.data, & relationship between objects.

►Class diagrams consist of the named class, Class diagrams consist of the named class, fields in the class, & actions (fields in the class, & actions (methodsmethods) that ) that act upon the class.act upon the class.

Page 27: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 27

Figure 6.13 Class DiagramFigure 6.13 Class Diagram

Page 28: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 28

Using the DatabaseUsing the Database

►FormsForms show 1 record at a time & can be show 1 record at a time & can be used to add, delete, or modify database used to add, delete, or modify database records.records. NavigationNavigation AccuracyAccuracy ConsistencyConsistency FilteringFiltering subformssubforms

Page 29: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 29

Figure 6.15 Combined Data Entry Figure 6.15 Combined Data Entry FormForm

Page 30: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 30

Using the Database (Cont’d)Using the Database (Cont’d)

►ReportsReports are aggregated data from the are aggregated data from the database that are formatted in a manner database that are formatted in a manner that aids decision making.that aids decision making.

►QueriesQueries is a request for the database to is a request for the database to display selected records.display selected records.

►Query-by-example (QBE)Query-by-example (QBE) presents a presents a standardized form that the user completes standardized form that the user completes so the system can generate a true query.so the system can generate a true query.

Page 31: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 31

Figure 6.16 Report of DepartmentsFigure 6.16 Report of Departments

Page 32: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 32

Structured Query LanguageStructured Query Language

►Structured query language (SQL)Structured query language (SQL) is is the code that RDBMSs use to perform their the code that RDBMSs use to perform their database tasks.database tasks.

►Method of choice for interacting with web-Method of choice for interacting with web-based databases.based databases.

►Writing SQL statements are not difficult for Writing SQL statements are not difficult for most manager’s data needs.most manager’s data needs.

Page 33: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 33

Figure 6.20 SQL CodeFigure 6.20 SQL Code

Page 34: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 34

Advanced Database ProcessingAdvanced Database Processing

► On-line analytical processing (OLAP)On-line analytical processing (OLAP) allows allows data analysis similar to statistical cross-tabulation.data analysis similar to statistical cross-tabulation.

► Data miningData mining, , data martsdata marts, & , & data warehousingdata warehousing focus on methodologies that offer users quick focus on methodologies that offer users quick access to aggregated data specific to their access to aggregated data specific to their decision-making needs.decision-making needs.

► Knowledge discoveryKnowledge discovery analyzes data usage & analyzes data usage & data commonality among different tables.data commonality among different tables.

Page 35: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 35

Database PersonnelDatabase Personnel

►Database Administrator (DBA)Database Administrator (DBA) is an is an expert in developing, providing, and expert in developing, providing, and securing databases; duties includesecuring databases; duties include Database planning;Database planning; Database implementation;Database implementation; Database operation;Database operation; Database security.Database security.

Page 36: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 36

Database Personnel (Cont’d)Database Personnel (Cont’d)►Database programmerDatabase programmer writes code to writes code to

strip and/or aggregate data from the strip and/or aggregate data from the databasedatabase High level of specialization & selectionHigh level of specialization & selection

►End userEnd user generates reports & forms, post generates reports & forms, post queries to the database, & use results from queries to the database, & use results from their database inquiries to make decisions their database inquiries to make decisions that affect the firm & its environmental that affect the firm & its environmental constituents. constituents.

Page 37: Management Information Systems, 10/eade.staff.gunadarma.ac.id/.../83231/5+DBMS_mcleodch06.pdf · © 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George

© 2007 by Prentice Hall Management Information Systems, 10/e Raymond McLeod and George Schell 37

DBMSs in PerspectiveDBMSs in Perspective►DBMS AdvantagesDBMS Advantages

Reduce data redundancy.Reduce data redundancy. Achieve data independence.Achieve data independence. Retrieve data & information rapidly.Retrieve data & information rapidly. Improve security.Improve security.

►DBMS DisadvantagesDBMS Disadvantages Obtain expensive software.Obtain expensive software. Obtain a large hardware configuration.Obtain a large hardware configuration. Hire and maintain a DBA staff.Hire and maintain a DBA staff.