Chapter 7 OBJECTIVES Describe basic file organization concepts and the problems of managing data resources in a traditional file environment Managing Data Resources Describe how a database management system organizes information and compare the principal database models Apply important database design principles Evaluate new database trends Identify the challenges posed by data resource management and management solutions 7.1 7.2 File Organization Terms and Concepts Bit: Smallest unit of data; binary digit (0,1) Byte: Group of bits that represents a single character Field: Group of words or a complete number Record: Group of related fields File: Group of records of same type File Organization Terms and Concepts (Continued) Database: Group of related files Entity: Person, place, thing, event about which information is maintained Attribute: Description of a particular entity Key field: Identifier field used to retrieve, update, sort a record 7.3 7.4 The Data Hierarchy Entities and Attributes Other terms: Rows, columns, primary key 7.5 Figure 7-1 The Order entity refers to orders placed for parts in an inventory system. It has several attributes. 7.6 Figure 7-2 1
Problems with the Traditional File Environment Data Redundancy and Inconsistency: Data redundancy: The presence of duplicate data in multiple data files so that the same data are stored in more than one place or location Sounds good, but it s a bad thing. Data inconsistency: The same attribute may have different values (in the redundant data). 7.7 Problems with the Traditional File Environment (Continued) Program-data dependence: The coupling of data stored in files and the specific programs required to update and maintain those files such that changes in programs require changes to the data (maintenance nightmare) Lack of flexibility: A traditional file system can deliver routine scheduled reports after extensive programming efforts, but it cannot deliver ad-hoc reports or respond to unanticipated information requirements in a timely fashion. Is Google and ad-hoc request (to the Oracle)? 7.8 Problems with the Traditional File Environment (Continued) Poor security: Because there is little control or management of data, management will have no knowledge of who is accessing or even making changes to the organization s data. Lack of data sharing and availability: Information cannot flow freely across different functional areas or different parts of the organization. Users find different values of the same piece of information in two different systems, and hence they may not use these systems because they cannot trust the accuracy of the data. 7.9 Traditional File Processing 7.10 Figure 7-3 Database Management System (DBMS) Software for creating and maintaining databases The Contemporary Database Environment Permits firms to rationally manage data for the entire firm Acts as interface between application programs and physical data files Separates logical and design views of data (loosley coupled / less user training) Solves many problems of the traditional data file approach 7.11 7.12 Figure 7-4 2
Pros & Cons of a DBMS PRO Reduced redundancy Less maintenance more integrity Increased productivity easy to use Security Put up firewalls CON Initial cost Possibly slow retrieval of some data Security break in & you have access to all files Components of DBMS: Data definition language: Specifies content and structure of database and defines each data element (e.g what is the command to add a table) Data manipulation language: Used to process data in a database (SQL: Structured query language) Data dictionary: Stores definitions of data elements and data characteristics 7.13 7.14 Sample Data Dictionary Report Types of Databases: Relational DBMS Hierarchical and network DBMS Object-oriented databases 7.15 Figure 7-5 7.16 Relational DBMS: Is widely used by search engines, Enterprise applications, data mining, many others Represents data as two-dimensional tables called relations The Relational Data Model Foreign key relates one table to another Relates data across tables based on common data element Examples: DB2, Oracle, Access, mysql 7.17 7.18 Figure 7-6 3
Three Basic Operations in a Relational Database: The Three Basic Operations of a Relational DBMS Select: Creates subset of rows that meet specific criteria Join: Combines relational tables to provide users with information Project: Enables users to create new tables containing only relevant information 7.19 7.20 Figure 7-7 Querying Databases: Elements of SQL Basic SQL Commands SELECT: Specifies columns in the table FROM: Identifies tables or views WHERE: Specifies conditions (for selecting rows) Where cost > 20 7.21 7.22 THE DATABASE C APPROACH TO DATA MANAGEMENT SELECT PART.Part_number, PART.Description, PART.Unit_Price FROM PART SELECT PART.Part_number, PART.Description, PART.Unit_Price FROM PART WHERE Unit_Price < 25 7.23 7.24 4
How is this easier than having one big file in Excel? An Unnormalized Relation for ORDER SELECT PART.Part_numer, PART.Supplier_numer, SUPPLIER.Supplier_name, SUPPLIER.Supplier_Address FROM PART, SUPPLIER WHERE PART.Supplier_number = SUPPLIER.Supplier_number 7.25 Repeating groups of data leads to data redundancy & update problems during transactions, e.g. the Supplier_address is often repeated, so an update to it would require multiple changes an an unnormalized table. There may be many transactions and updates, so want this update process kept simple and accurate. 7.26 Figure 7-10 Normalized Tables Created from ORDER Relational database structure is easier to update/maintain than other database structures add, delete, modify table data Rows & columns easily changed in one place only 7.27 Figure 7-11 If your data or questions you ask don t change much, then other database structures might be better 7.28 Hierarchical and Network DBMS Hierarchical DBs are fast Used to resolve domain names in URLs to IP addresses for computer use Hierarchical DBMS: Organizes data in a tree-like structure Supports one-to-many parent-child relationships Prevalent in large legacy systems 7.29 7.30 5
A Hierarchical Database for a Human Resources System Hierarchical and Network DBMS Network DBMS: Depicts data logically as many-to-many relationships 7.31 Figure 7-8 7.32 The Network Data Model Hierarchical and Network DBMS Disadvantages: Outdated Less flexible compared to RDBMS Lack support for ad-hoc and English languagelike queries 7.33 Figure 7-9 7.34 Object-Oriented Databases: Object-oriented DBMS: Stores data and procedures as objects that can be retrieved and shared automatically Object-relational DBMS: Provides capabilities of both object-oriented and relational DBMS Designing Databases: Conceptual design: Abstract model of database from a business perspective Physical design: Detailed description of business information needs 7.35 7.36 6
Designing Databases: (Continued) An Unnormalized Relation for ORDER Entity-relationship diagram: Methodology for documenting databases illustrating relationships between database entities Normalization: Process of creating small stable data structures from complex groups of data 7.37 7.38 Figure 7-10 Normalized Tables Created from ORDER An Entity-Relationship Diagram 7.39 Figure 7-11 7.40 Figure 7-12 Distributing Databases Centralized database: Used by single central processor or multiple processors in client/server network There are advantages and disadvantages to having all corporate data in one location. Security is higher in central environments, risks lower. If data demands are highly decentralized, then a decentralized design is less costly, and more flexible. Distributed database: Databases can be decentralized either by partitioning or by replicating Partitioned database: Database is divided into segments or regions. For example, a customer database can be divided into Eastern customers and Western customers, and two separate databases maintained in the two regions. 7.41 7.42 7
Duplicated database: The database is completely duplicated at two or more locations. The separate databases are synchronized in off hours on a batch basis. Distributed Databases Regardless of which method is chosen, data administrators and business managers need to understand how the data in different databases will be coordinated and how business processes might be effected by the decentralization. 7.43 7.44 Figure 7-13 Ensuring Data Quality: Corporate and government databases have unexpectedly poor levels of data quality. National consumer credit reporting databases have error rates of 20-35%. 32% of the records in the FBI s Computerized Criminal History file are inaccurate, incomplete, or ambiguous. Gartner Group estimates that consumer data in corporate databases degrades at the rate of 2% a month. 7.45 Ensuring Data Quality: (Continued) The quality of decision making in a firm is directly related to the quality of data in its databases. Data Quality Audit: Structured survey of the accuracy and level of completeness of the data in an information system Data Cleansing: Consists of activities for detecting and correcting data in a database or file that are incorrect, incomplete, improperly formatted, or redundant 7.46 Multidimensional Data Analysis Multidimensional Data Model Online Analytical Processing (OLAP): Multidimensional data analysis Supports manipulation and analysis of large volumes of data from multiple dimensions/perspectives 7.47 7.48 Figure 7-14 8
Data Warehousing and Data Mining Components of a Data Warehouse Data warehouse: Supports reporting and query tools Stores current and historical data Consolidates data for management analysis and decision making 7.49 7.50 Figure 7-15 Data mart: Subset of data warehouse Contains summarized or highly focused portion of data for a specified function or group of users Data mining: Tools for analyzing large pools of data Benefits of Data Warehouses: Improved and easy accessibility to information Ability to model and remodel the data Find hidden patterns and infer rules to predict trends 7.51 7.52 Databases and the Web A Hypermedia Database The Web and Hypermedia database: Organizes data as network of nodes Links nodes in pattern specified by user Supports text, graphic, sound, video, and executable programs 7.53 7.54 Figure 7-16 9
Databases and the Web Database server: Computer in a client/server environment runs a DBMS to process SQL statements and perform database management tasks. Linking Internal Databases to the Web Application server: Software handling all application operations 7.55 7.56 Figure 7-17 MANAGEMENT OPPORTUNITIES, CHALLENGES, AND SOLUTIONS MANAGEMENT OPPORTUNITIES, CHALLENGES, AND SOLUTIONS Management Opportunities: Business firms have exceptional opportunities to exploit modern relational database technologies to improve decision making, and to increase the efficiency of their business processes. Management Challenges: Organizational obstacles to a database environment Need for cooperation in developing corporate-wide data administration Cost/benefit considerations Bringing about significant change in the database environment of a firm can be very expensive and time consuming. 7.57 7.58 MANAGEMENT OPPORTUNITIES, CHALLENGES, AND SOLUTIONS Solution Guidelines: MANAGEMENT OPPORTUNITIES, CHALLENGES, AND SOLUTIONS Key Organizational Elements in the Database Environment The critical elements for creating a database environment are: Data administration Data-planning and modeling methodology Database technology and management Users 7.59 7.60 Figure 7-18 10