sim - mc leod ch06

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

Upload: welly-tjoe

Post on 14-Jan-2015

297 views

Category:

Education


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: SIM - Mc leod ch06

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

11

Management Management Information Systems, Information Systems,

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

Schell Schell

Page 2: SIM - Mc leod ch06

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

22

Chapter 6Chapter 6

Database Management Database Management Systems Systems

Page 3: SIM - Mc leod ch06

© 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 Know how to relate tables together in a

database.database.► Recognize the difference between a database Recognize the difference between a database

and a database management system.and 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: SIM - Mc leod ch06

© 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 Understand entity-relationship diagrams and class diagrams.class 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-structured query language and query-by-example.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: SIM - Mc leod ch06

© 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 is a collection of related data

fields.fields.►FileFile is a collection of related records. is a collection of related records.►DatabaseDatabase is a collection of related is a collection of related

files.files. General definitionGeneral definition Restrictive definitionRestrictive definition

Page 6: SIM - Mc leod ch06

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

6

DatabaseDatabase

► Table of rows & columns can be represented in Table of rows & columns can be represented in a spreadsheet.a spreadsheet.

►Relational database structureRelational database structure is is conceptually similar to a collection of related conceptually similar to a collection of related tables.tables.

► Flat fileFlat file 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 is a formal process for eliminating redundant data fields which eliminating redundant data fields which preserving the ability of the database to add, preserving the ability of the database to add, delete, and modify records without causing delete, and modify records without causing errors.errors.

Page 7: SIM - Mc leod ch06

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

7

Figure 6.1 Spreadsheet as a Figure 6.1 Spreadsheet as a Simple DatabaseSimple Database

Page 8: SIM - Mc leod ch06

© 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 in a table is a field (or combination of fields) that contain a value that uniquely fields) that contain a value that uniquely identifies each record in the table.identifies each record in the table.

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

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

Page 9: SIM - Mc leod ch06

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

9

Database Management Database Management SystemSystem

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

Page 10: SIM - Mc leod ch06

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

10

Database StructuresDatabase Structures

►HierarchicalHierarchical is formed by data is formed by data groups, subgroups, and further groups, subgroups, and further subgroups; like branches on a tree.subgroups; like 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 records; allows a given record to point to any other record in the database.to any other record in the database.

Page 11: SIM - Mc leod ch06

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

11

Figure 6.2 Hierarchical Figure 6.2 Hierarchical StructureStructure

Page 12: SIM - Mc leod ch06

© 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, database structure (hierarchical, network) rely on storage addresses.network) 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: SIM - Mc leod ch06

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

13

A Relational Database A Relational Database ExampleExample

►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: SIM - Mc leod ch06

© 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: SIM - Mc leod ch06

© 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: SIM - Mc leod ch06

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

16

Figure 6.5 Defining the CODE Figure 6.5 Defining the CODE FieldField

Page 17: SIM - Mc leod ch06

© 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: SIM - Mc leod ch06

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

18

Table 6.7Table 6.7

Page 19: SIM - Mc leod ch06

© 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: SIM - Mc leod ch06

© 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 is the logical integration of records across multiple physical locations.of records across multiple physical locations.

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

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

Page 21: SIM - Mc leod ch06

© 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 Determine data that needs to be collected & stored is a key step.collected & 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: SIM - Mc leod ch06

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

22

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

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

Page 23: SIM - Mc leod ch06

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

23

Figure 6.8 Enterprise Data Figure 6.8 Enterprise Data ModelModel

Page 24: SIM - Mc leod ch06

© 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 is a conceptual collection of related data fields.related 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: SIM - Mc leod ch06

© 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: SIM - Mc leod ch06

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

26

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

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

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

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

Page 27: SIM - Mc leod ch06

© 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: SIM - Mc leod ch06

© 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 show 1 record at a time & can be used to add, delete, or modify be used to add, delete, or modify database records.database records. NavigationNavigation AccuracyAccuracy ConsistencyConsistency FilteringFiltering subformssubforms

Page 29: SIM - Mc leod ch06

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

29

Figure 6.15 Combined Data Figure 6.15 Combined Data Entry FormEntry Form

Page 30: SIM - Mc leod ch06

© 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 database that are formatted in a manner that aids decision making.manner that aids decision making.

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

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

Page 31: SIM - Mc leod ch06

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

31

Figure 6.16 Report of Figure 6.16 Report of DepartmentsDepartments

Page 32: SIM - Mc leod ch06

© 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 the code that RDBMSs use to is the code that RDBMSs use to perform their database tasks.perform their database tasks.

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

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

Page 33: SIM - Mc leod ch06

© 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: SIM - Mc leod ch06

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

34

Advanced Database Advanced Database ProcessingProcessing

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

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

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

Page 35: SIM - Mc leod ch06

© 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 is an expert in developing, providing, an expert in developing, providing, and securing databases; duties includeand securing databases; duties include Database planning;Database planning; Database implementation;Database implementation; Database operation;Database operation; Database security.Database security.

Page 36: SIM - Mc leod ch06

© 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 writes code to strip and/or aggregate data from to strip and/or aggregate data from the databasethe database High level of specialization & selectionHigh level of specialization & selection

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

Page 37: SIM - Mc leod ch06

© 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.