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

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 Jr. and George Raymond McLeod Jr. and George P. Schell P. Schell

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

© 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 Jr. and George P. Raymond McLeod Jr. and George P.

Schell Schell

© 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

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

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

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

5

The Data HierarchyThe Data 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

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

6

DatabaseDatabase

► Table of rows and columns can be represented Table of rows and columns can be represented in a spreadsheet.in 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 while eliminating redundant data fields while 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.

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

7

Figure 6.1 Spreadsheet Example Figure 6.1 Spreadsheet Example of the COURSE Tableof the COURSE Table

© 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 and the value of the field common field and the value of the field determines which rows in the tables are determines which rows in the tables are logically joined.logically joined.

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

9

Database StructuresDatabase Structures

►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 and data in the database, and forms and reports pertaining to the database.reports pertaining to the database. Self-describing set of related data.Self-describing set of related data.

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

10

Hierarchical Database Hierarchical Database StructuresStructures

►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 TPSsWorked well with TPSs Utilized computer resources efficientlyUtilized 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.

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

11

Figure 6.2 The Hierarchical Structure Figure 6.2 The Hierarchical Structure Between the DEPARTMENT and COURSE Between the DEPARTMENT and COURSE

TablesTables

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

© 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 has been created from tables used earlier in the created from tables used earlier in the chapter and some otherschapter and some others

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

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

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

14

The The ScheduleSchedule Database Database

► The example is implemented on Microsoft Access The example is implemented on Microsoft Access DBMS but would be similar on any relational DBMS DBMS but would be similar on any relational DBMS product. product.

► The COURSE table in Access (Figure 6.4) is a list of The COURSE table in Access (Figure 6.4) is a list of data field values. The table itself had to be defined in data field values. The table itself had to be defined in Access before values were entered into the data fields. Access before values 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 field values will

be looked up from a list of values in the DEPARTMENT be looked up from a list of values in the DEPARTMENT table.table.

► Table 6.7 shows a single table of course and Table 6.7 shows a single table of course and department fields before they were separated into department fields before they were separated into different tables.different tables.

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

15

Figure 6.4 The COURSE Table in Figure 6.4 The COURSE Table in AccessAccess

© 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

© 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

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

18

Table 6.7 Unseperated Table of Table 6.7 Unseperated Table of Course and Department Data Course and Department Data

FieldsFields

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

19

Figure 6.7 Access View of Figure 6.7 Access View of Tables, Fields, and their Tables, Fields, and their

RelationshipsRelationships

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

20

The Database ConceptThe Database 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 and the data stored within the database and controlled by the database management controlled by the database management system.system.

© 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 and stored is a key step.collected and 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.

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

22

Determine Data NeedsDetermine Data Needs

►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, and synergy of data resources and synergy of data resources between business areas can be between business areas can be leveraged.leveraged. Result: Result: Enterprise data modelEnterprise data model

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

23

Figure 6.8 Creating an Figure 6.8 Creating an Enterprise Data ModelEnterprise Data Model

© 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

© 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

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

26

Diagramming TechniquesDiagramming Techniques

►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 model.the data; object-oriented design model.

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

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

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

27

Figure 6.13 Class DiagramFigure 6.13 Class Diagram

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

28

Using the DatabaseUsing the Database

►FormsForms show one record at a time and show one record at a time and can be used to add, delete, or modify can be used to add, delete, or modify database records.database records. NavigationNavigation AccuracyAccuracy ConsistencyConsistency FilteringFiltering SubformsSubforms

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

29

Figure 6.15 Combined Data Entry Form Figure 6.15 Combined Data Entry Form for the COURSE and PROJECT Tablesfor the COURSE and PROJECT Tables

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

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

31

Figure 6.16 Report of Departments Figure 6.16 Report of Departments Showing Courses Offered and Course Showing Courses Offered and Course

ProjectsProjects

© 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 Web-Method of choice for interacting with Web-

based databases.based databases. Writing SQL statements are not difficult Writing SQL statements are not difficult

for most manager’s data needs.for most manager’s data needs.

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

33

Figure 6.20 Structured Query Language Figure 6.20 Structured Query Language Code to Find Projects for the MIS105 Code to Find Projects for the MIS105

CourseCourse

© 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, and , and 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 and data commonality among usage and data commonality among different tables.different tables.

© 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 and securing databases; duties include:include: Database planning;Database planning; Database implementation;Database implementation; Database operation;Database operation; Database security.Database security.

© 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 and selectionHigh level of specialization and selection

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

© 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 and information rapidly.Retrieve data and 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.