DATABASE MANAGEMENT SYSTEMS -

Transcription

DATABASE MANAGEMENT SYSTEMS

This page intentionally left blank

DATABASE MANAGEMENTSYSTEMS: A BUSINESSORIENTED APPROACH USINGORACLE, MySQL, ANDMS ACCESSSOTIRIOS ZYGIARISUniversity of Maryland, USA and PMU University, KSAUnited KingdomNorth AmericaJapanIndiaMalaysiaChina

Emerald Publishing LimitedHoward House, Wagon Lane, Bingley BD16 1WA, UKFirst edition 2018Copyright r 2018 Emerald Publishing LimitedReprints and permissions serviceContact: permissions@emeraldinsight.comNo part of this book may be reproduced, stored in a retrieval system, transmitted inany form or by any means electronic, mechanical, photocopying, recording orotherwise without either the prior written permission of the publisher or a licencepermitting restricted copying issued in the UK by The Copyright Licensing Agencyand in the USA by The Copyright Clearance Center. Any opinions expressed in thechapters are those of the authors. Whilst Emerald makes every effort to ensure thequality and accuracy of its content, Emerald makes no representation implied orotherwise, as to the chapters’ suitability and application and disclaims any warranties,express or implied, to their use.British Library Cataloguing in Publication DataA catalogue record for this book is available from the British LibraryISBN: 978-1-78756-696-5 (Print)ISBN: 978-1-78756-695-8 (Online)ISBN: 978-1-78756-697-2 (Epub)DBMS used in the bookORACLE 11g APEX 4.2Maria DB (formerly MySQL) from XAMPP stack 5.5.30Microsoft Access 2013Screenshots from Oracle 11g Application Express 4.2. Copyright Oracle, used withpermission by Oracle Corporation.ISOQAR certifiedManagement System,awarded to Emeraldfor adherence toEnvironmentalstandardISO 14001:2004.Certificate Number 1985ISO 14001

To the memory of my father. To my dear mother and my family Nitsa,Maria, and Georgia

This page intentionally left blank

AcknowledgmentsThis book has been a group effort, and there many people who contributed andtheir help meant a great deal to me. I am in a continual state of gratitude to allmy PMU students who helped with their remarks while I was teaching thecourse. I am grateful because I received important constructive comments froma student’s point of view. I am grateful to my reviewers Dr Malik F. Saleh andIsidoros Passas whose ideas and suggestions are scattered throughout this book.Lastly, I owe a special debt of gratitude to Krista Marie Osborne PMU’s supervisor of Advising and Learning Enrichment Services for her valuable editingsupport.

This page intentionally left blank

ContentsAbout the AuthorxvPrefacexviiTo the StudentxixTo the InstructorxxiPART I: UNDERSTANDING THE DATABASEAPPROACHChapter 1 The DataBase Environment1.1. From Data to Information to Knowledge1.2. Databases1.2.1. File Systems1.2.2. The Database Approach1.3. The Database Environment1.3.1. Database Management1.3.2. Types of DBMS33779111214Chapter 2 DataBase Design2.1. The Database Development Process2.2. Conceptual Database Design2.2.1. Designing Entities2.2.2. Designing Relationships2.3. Logical Database Design Using the Relational Model2.3.1. Step 1: Converting Entities into Tables2.3.2. Step 2: Implementing 1:M Relationships2.3.3. Step 3: Implementing M:M Relationships2.4. Normalization Optimizing the Database Design2.4.1. Converting the Database to FirstNormal Form (1NF)2.4.2. Converting the Database to SecondNormal Form (2NF)2.4.3. Converting the Database to Third NormalForm (3NF)21212425262828303336363840

xContentsPART II: DATABASE DEVELOPMENTChapter 3 Structured Query Language (SQL): Data Management3.1. SQL Basics3.2. Creating the Database3.2.1. Creating the Database Tables3.3. Inserting Data into the Database3.4. Deleting and Updating Data3.4.1. Deleting Data from a Database3.4.2. Updating the Data of a Database3.4.3. ON DELETE and ON UPDATE ReferentialIntegrity Constraints3.4.4. Updating the Table Structure49494950677071757684Chapter 4 Structured Query Language (SQL):Introducing Queries4.1. Query Basics4.2. Understanding the Operations of SQL queries4.2.1. Attribute and Row Selection4.2.2. Selection Extraction and Update of Query Data4.2.3. Executing SQL Queries4.3. Forming SQL Queries4.3.1. Create SQL Queries Using Conditional andLogical Operators4.3.2. Create SQL Queries Using Text Searching4.3.3. Create SQL Queries Using Date Searching4.3.4. Using Arithmetic Operations in SQL Queries4.3.5. Using the DISTINCT Clause4.3.6. Sorting the Data in SQL Queries4.4. SQL Aggregate Functions4.4.1. The COUNT Aggregate Function4.4.2. The SUM Aggregate Function4.4.3. The AVG Aggregate Function4.4.4. The MAX Aggregate Function4.4.5. The MIN Aggregate Function98103105105107108110112114115116117Chapter 5 Structured Query Language (SQL):In Multiple Tables5.1. Joining Tables5.1.1. The Rationale of Table Joining5.1.2. Joining Tables with Cross Join5.1.3. From Cross Join to Inner Join12112112112212493939393959698

Contents5.2. SQL JOIN Operator5.2.1. Inner Join5.2.2. Outer Join5.2.3. Using Alias in JOIN5.2.4. Cases of Using SQL Commands in Joined Tables5.2.5. Recursive JOIN5.3. Relational Set Operators5.3.1. UNION Set Operator5.3.2. INTERSECT Set Operator5.3.3. MINUS Set Operatorxi126126127128129135137137138139Chapter 6 Structured Query Language (SQL):Grouping Data and Subqueries6.1. Grouping Data6.1.1. The Rationale of Data Grouping6.1.2. The GROUP BY Clause6.1.3. The DISTINCT Clause6.1.4. Grouping with Limitations Using theWHERE Clause6.1.5. Grouping with Calculated Attributes6.1.6. The HAVING Clause6.2. Subqueries6.2.1. The Rational of Using Subqueries6.2.2. WHERE Subqueries6.2.3. HAVING Subqueries6.2.4. IN Subqueries6.2.5. ALL and ANY Subqueries6.2.6. SELECT Subqueries6.2.7. FROM Subqueries6.2.8. INSERT, UPDATE, DELETE Revised withSubqueries168Chapter 7 Structured Query Language (SQL):Views, Triggers, and Functions7.1. Views7.1.1. Creating Virtual Tables as Views7.1.2. Data Updating through Views7.2. Triggers7.2.1. The Rationale of Triggers7.2.2. Creating Triggers7.3. SQL Functions7.3.1. Managing Arithmetic Attributes in 50152153156156159162163166167167

xiiContents7.3.2.7.3.3.7.3.4.7.3.5.Selecting Random Values in QueriesConcatenating and Managing Text AttributesDate Managing Functions in QueriesCreating User-defined Functions183184186188PART III: DATABASE MANAGEMENTChapter 8 DataBase: Administration and Security8.1. Database Administration8.1.1. Database and Metadata Administration8.1.2. Database Optimization8.1.3. Efficient Data Storage Configuring Partitioning8.1.4. Indexes Improving Database Performance8.1.5. Database Backup and Recovery8.2. Database Security8.2.1. Database Security Threats8.2.2. Mitigating Database Security Threats8.2.3. Creating Users and Granting Privileges195195197199200201204205205208209Chapter 9 Building Web DataBase Applications9.1. Database Applications9.1.1. Defining Database Applications9.1.2. Database Application GET and POST Operations9.1.3. Single-user and Multiuser Applications9.1.4. Web Database Applications9.2. Building Database Applications9.2.1. Building a Web Database Application in ORACLE9.2.2. Building a Database Application in MS-Access9.2.3. Building a Database Application in MariaDB219219219221223223223223228230Chapter 10 DataBases in the Business World10.1. Business Challenges in the Global Economy10.2. Business Intelligence10.2.1. A Framework for Business Intelligence10.2.2. Data Warehouses and OLAP Services10.2.3. OLAP Operations Roll-up, Drill-down,Slice and Dice, Pivot10.2.4. SQL ROLLUP, CUBE, and GROUPIN OLAPExtensions10.2.5. Data Mining in Big Data10.2.6. Data and Predictive Analytics241241242242244245247250252

Contents10.3.xiiiEnterprise-wide Reporting10.3.1. The Need for Integration in Business ISs10.3.2. ERPs and Enterprise-wide Reporting10.3.3. Databases in ERPs10.3.4. Cloud Enterprise Computing253253254257258Chapter 11 Distributed DataBases and Concurrency Control11.1. Centralized and Distributed Databases11.2. Distributed Database Design11.2.1. The Fragmentation Replication Dilemma11.2.2. Distributed Database Fragmentation11.3. Using Distributed Databases11.3.1. Client’s Distribution Transparency11.3.2. Client’s Distribution Transparency11.4. Concurrency Control11.4.1. Transaction Management in SQL11.4.2. Concurrency Control with Lost Updates11.4.3. Concurrency Control with Uncommitted Data11.4.4. Concurrency Control with Scheduler11.4.5. Two-Phase Commit Protocol in 277278279References289Index291280

This page intentionally left blank

About the AuthorDr. Sotirios Zygiaris is an IT professional working withecommerce and business intelligence applications. Hereceived his PhD in Innovation Management fromAristotle University, Greece and his main degrees fromLamar University in Texas, USA in Computer Science(BSc) and MIS (MSc).He has six years of IT experience working for FinaOil and Chemical. He has also worked as a Lecturerat the University of Sheffield teaching computer sciencecourses. With 12 years of research management experience managing European Union multinational researchprojects in technological innovation and industrial research and development, heis a European Union international expert in innovation and smart city technological platforms.Dr Zygiaris was an Associate Professor of Information Technology atUniversity of Maryland College. Currently, he is an Assistant Professor ofManagement Information Systems at PMU in the Kingdom of Saudi Arabia.He is the author of two books related to business transformation using technological advancements and business process re-engineering.

This page intentionally left blank

PrefaceThis book is meant to help business students and professionals to learn the concept of databases in all aspects from design and implementation, to managementof databases. A database is a central component of every business application.You as a business student must understand how data are stored, retrieved, andmanaged in your corporate environment. With the advancing of enterprise computing and cloud technologies, managers are responsible to retrieve data ad hocand construct business reports for decision-making and storytelling. Managershaving solid knowledge of database technologies are empowered with analyticaland reporting skills. For this reason, an advancing number of universitiesinclude in their business administration curriculum database management intheir skill set profile.The book manages to codify all information technology issues in databasedesign and implementation into terms that can be easily understood by businessstudents. For example, other relative textbooks cover database design in up tofour chapters, at an average of seventy pages, presenting complex design methodologies that are very difficult to be followed by non-IT students. On thecontrary, this book has codified the database design process in twenty pages inChapter 2, presenting in discrete steps the database designing process.One case study, “Atza Inc.,” is used throughout the book that follows alldatabase aspects from design to implementation to management. This way, thestudents follow all phases of a database cycle in examples and illustrations provided in each book chapter. Four more business cases in project management,human resources, inventory management, and customer service are specified.These cases are allocated to students as work for projects and assignments. Thecase study for Atza Inc. refers to a fictitious company that the book purposes. Anydata used in this book are imaginary and are not related to any real company orpersons.The book covers three different database management systems: MS-Access,ORACLE, and MariaDB, facilitating the adaptation to different lab specifications and database environments. To avoid lengthy technical implementationdetails, the readers are directed to the book’s YouTube video channel where alltechnical implementation details are presented in each one of the three corresponding database management systems. For example, when the student has tolearn how to create database tables in ORACLE, he/she follows the book linkto the relative video. New editions of database management systems are coveredby modifying the videos without any changes to the textbook.The first part of the book covers the topics on database environment anddatabase design. The second part from Chapters 3 to 7 covers the structured

xviiiPrefacequery language (SQL) extensively as a basic management tool to build, store,retrieve data, and make business reports by processing the data. The third partcovers database management tools in managing and securing the database, creating business intelligence, and understanding the concept of distributed databases in corporate environments.

To the StudentEvery feature of this book is designed to help you learn the database management concept. I have a few goals for you in this book: to understand the importance of databases in the business environment and to assist you in developingproblem-solving techniques using databases. I want you to learn databases in anew way, removing and codifying all technical and theoretical complexities andpresenting the topic in manner that will be appreciated by non-IT students.To improve the learning experience, read every chapter carefully. Follow thelinks to YouTube videos presenting visual and technical implementation detailsin a gradual manner. At the end of the book, follow the terminology. It is veryimportant to “speak the terms” when taking interviews, engaging in discussions,or writing business reports. Answer the review questions at the end of each chapter. When you feel ready, test your knowledge by taking the online multiplechoice quiz for each chapter. Make sure that you go back and review the chapterwhen questions are not answered correctly.I provide for you two ways to receive practical experience. First, follow theforecasting case study in problems and exercises at the end of Chapter 2 andsolve all problems and exercises in each chapter following the same case study.Follow the “Atza Inc.” examples illustrated in chapter and do the exercises usingthe forecasting case study. All problems and exercises at the end of each chapterrefer to this case study.Second, choose one or more of the four case studies in project management,human resources, inventory management, or customer service. This is your mainassignment that must be implemented in the database management system thatyou are using. In Chapter 2, you must do the database design. In Chapter 3, youwill implement the proposed design into a database. In Chapters 4 7, you mustinclude all SQL queries necessary for business reporting. In Chapter 8, you willinclude all database management features for optimizing and securing yourdatabase. In Chapter 9, you will create a web application using visual tools. Theapplication ensures that all operations such as data entry, update, deletion, andqueries are made through client web pages using forms and reports. InChapter 10, you will enhance your application inserting three-dimensional business reports.Lastly, this book imparts the necessary structured and codified knowledgeand leaves an impression that database management is not reserved only for ITstudents with high technical and programing skills. In fact, with the right guidance from your course instructor, all students from every discipline can masterdatabase management, including you!

This page intentionally left blank

To the InstructorI would like to thank all who have chosen this book edition as a textbook fordelivering your course. This textbook is designed as a one-semester course indatabase management systems. Although it is intended for non-IT students, ITstudents will also find it very resourceful and concise. “To the point” is a frequent comment I had received from students.One case study, “Atza Inc.” is used throughout the book that follows alldatabase aspects from design to implementation to management. The first partof the book covers the topics on database environment and database design.The second part from Chapter 3 to 7 covers the structured query language(SQL) extensively, as a basic management tool to build, store, retrieve data, andmake business reports by processing the data. The third part covers databasemanagement tools in managing and securing the database, creating businessintelligence, and understanding the concept of distributed databases in corporateenvironments.Once the students conceptualize the database environment in Chapter 1, theymust understand the database design process from requirement document andconceptual design (E R diagram) to logical design (ERM diagram). At thispoint, they must choose one of the four case studies in project management,human resources, inventory management, or customer service, and conduct adatabase design exercise. The “Atza Inc.” case study will be used as the mainterm project assigned to single or group of projects.In Chapter 3, where the database design must be implemented into a database, you must choose one of the three covered DBMS (MS-Access, ORACLE,or MARIADB) as your class working system. Follow the correspondent’sDBMS YouTube videos to create and populate with data a database. InChapters 4 7, you must include all SQL queries necessary for business reporting. In Chapter 8, you will include all database management features for optimizing and securing your database. In Chapter 9, you will create a webapplication using visual tools. The application ensures that all operations suchas data entry, update, deletion, and queries are made through client web pagesusing forms and reports. In Chapter 10, you will enhance your applicationinserting three-dimensional business reports. Examples of term project assignments are provided online in the instructor’s resources.Use the forecasting case study in the “Problems and Exercises” sections fromChapter 2 for small assignments and homework at the end of each chapter.Make sure that students follow the “Atza Inc.” examples illustrated in thechapter and do the exercises using the selected case study. All problems andexercises at the end of each chapter refer to this case study. Examples of

xxiiTo the Instructorassignments and model answers are provided online in the instructor’s resources.Each chapter is covered by: Online multiple-choice quizzes (uploadable in text form or to a form for directupload into blackboard or canvas) along with the answer key in the instructor’s resources. A PowerPoint presentation for each chapter in the instructor’s resources. Solutions to review questions and exercises.

PART I: UNDERSTANDING THEDATABASE APPROACHChapter 1: The DataBase EnvironmentLearning Objectives To comprehend the value and use of data in producing valuable informationfor decision-making and the creation of business knowledge. To understand the environment in which data are stored and manipulatedusing database management systems (DBMS).Chapter 2: DataBase DesignLearning Objectives To understand the database development life cycle from analysis toimplementation. To apply the database process from conceptual to logical design for optimization through normalization.

This page intentionally left blank

Chapter 1The DataBase Environment1.1.From Data to Information to KnowledgeThe first component in the word Database derives from the plural of Latindatum, which means “a given thing.”1 In fact, data are determined as a vastamount of unprocessed numbers, characters, images, and video and audio elements including supermarket invoices, audit videos, location coordinates, theorders taken by sales representatives, and the check-in and checkout timesheetsof employees over the past year. In our physical world, an abundance of data isstored in the form of physical records. Companies keep their everyday businesstransactions in accounting books like accounts payable or the general ledger formany years. Today these data are being kept in digital form.Data in either physical books or digital files are valuable company assets thatdocument historical facts, verify business transactions, and improve thedecision-making process. Although the physically kept data provide importantdocumentation for past business activities, they are difHumans canficult to be processed by managers due to the vastprocess a limitedamount of paper-based facts. For example, the producamount of datation manager examines the book of finished orders forthe past year consisting per se of 8,000 order invoices.It is impossible to memorize these figures and make rational conclusions aboutthe peaks and gaps in the production lines.Digital data are processed by computers that have the capacity to memorizenumerous data forms and process them using information systems. For this reason, businesses are digitizing physical data to illustrate in full capacity their digital business content. Information systems can “read” numerous digitized dataand store them in the memory for processing. For example, in bank transactions, in stock trade price fluctuations, in payments received in ecommerce, alldata are stored digitally and they are ready to be processed by information systems. Figure 1.1 illustrates partial data stored in a spreadsheet recording thesales of a superstore. The number of records or rows representing sales reaches,on an average, 3,000 record sales every day. These records are entered in digital1http://www.etymonline.com/index.php?term data

4Database Management SystemsFigure 1.1.Sample Data Presenting Superstore Sales.2form into the superstore’s information system, where they are ready to be processed by managers. This data processing may take different forms, for example:(1)(2)(3)(4)Can I insert a new sales record with Order ID equal to 890?What is the sale amount for the order with ID equal to 998?Can I change order quantity from 22 to 18 for sale with Order ID equal to 613?Can I delete the sale with Order ID equal to 1761?Processing data involves every date management that includes data retrievaland transformations that take the form of Create, Read, Update, and Delete(CRUD) transactions.CCan I insert a new sales record with Order ID equal to 890?RWhat is the sale amount for the Order with ID equal to 998?UCan I change quantity from 22 to 18 for sale with Order ID equal to 613?DCan I cancel sale with Order ID equal to 1761?The R operation just reads the data without making any modificationsto them. The C, U, and D operations modify the data. The benefit of fast2https://community.tableau.com/docs/DOC-1236

The Database Environment5accessibility and transactional effectiveness is very important in facilitating business transactions. The most important managerial benefit is taking place whenappropriate data processing takes place to support the decision-making process.Superstore assumes 3,000 sales daily with an estimated number of salesover one million per year. Figure 1.2 represents examples of the generated information for Superstore. This information takes the form of a managerial reportYear1234567891011Quarter ter er er 12000100008000First Draft Copyri ght MaterialQuarter 16000Quarter 24000Quarter 32000Quarter 4YeaYe r 1aYe r 2aYe r 3arYe 4arYe 5aYe r 6aYe r 7aYe r 8Ye ar 9aYe r 10ar110120001000080006000Quarter 1400020000Year Year Year Year Year Year Year Year Year Year Year12345678910 11Figure 1.2. Transforming Data to Information for Superstore.

6Database Management Systemsfor presenting quarterly sales for the past 10 years. Over 12 million salesfigures (data) were processed to produce information regarding quarterly sales ina table form. The sales report includes a bar chart for the monthly sales inJanuary over the past year. Quarterly data are illustrated as a histogram toshow the linear progress of sales.All these reports are referred as information. Information is understanding themeaning of data in a manner that reduces uncertainty. The initial claim that“Humans can process a limited amount of data” is verified since managerscannot memorize and handle such a vast amount (millions) of data. The salesfigures must be presented in a manner useful to managers to make decisions,which take the form of reported information. The superstore sales manager capitalizes on this information to examine the progress of sales for the past ten yearsor the historical progress of data for the month of January for decision-makingin relation to sales management.The observation of information in consecutive terms leads to knowledgecreation, when managers learn the behavioral patterns of their business. Forexample, observing the quarterly superstore sales in Figure 1.2, the first quartersales are relatively high (over 9,500) and the secondObservingquarter sales drop significantly (in years 2, 3, 6, 9, andinformation leads10). This information leads to specific knowledge as patto the creation oftern. When increased sales appear in the first quarter,knowledgethe sales manager must respond proactively to supportsales in the second quarter. In the third quarter, salesover 9,000 usually lead to high sales in the fourth quarter (in years 1, 3, 6, 8, 9,and 10). Managers could also act proactively to increase stock levels to satisfythe projected high demand for the fourth quarter.The derived information benefits a business when it is: Accurate. Valid data are the source of accurate information. Data entry methods must be used to ensure the validity of data. Complete. Decision-making based on partially available information leads tofaulty decisions. Updated. Information is valid only for the time interval that data are valid.Any changes in data modify also the context of information.The transformation of data to information is succeeded through InformationSystems. These systems receive data as input, which are processed to produceinformation, which are in the form of managerial reports. Information systemsexist in sales, finance, production, and all functional units of a business.Information systems include applications that do specific tasks like computingperformance bonuses for employees or computing the reorder level of a productin the inventory. Information systems are used across various industrial orservice business sectors. For example, in a banking information system, dataare collected and stored from everyday transactions and from other externalsources. These data are processed by the information system and produce managerial reports to assess cash flow, liquidity, interest rates, or credit policies.

The Database Environment1.2.7DatabasesData are stored permanently in storage devices and they are retrieved in memoryby information systems. When a bank starts its daily operations, all customeraccount data are retrieved and the updated account data are stored again to thedatabase at the end of the day. Permanent storage occurs in hardware like in acomputer’s hard disk or in data centers on the cloud. They can be retrieved andstored back again at any time. Data are stored in a structured form, which iscalled a base. The base could take a form of a two-dimensional table, exactly theway fields are stored in a worksheet. See the table structure in Figure 1.1, wherethe columns represent the table’s attributes and the rows the table’s data records.A simplified database structure is a collection of interrelated two-dimensionaltables. Businesses create and maintain databases as a corporate resource toensure data sourcing in their information systems. Each table represents a business entity like a salesperson, a department, a product, or an employee. Tounderstand the database approach, a short review of the evolutions of datastorage forms from file to database systems is required.The business information systems in the 1960s, 1970s, and early 1980s usedfile systems to store, retrieve, and manipulate data. Many early business applications in this era were implemented using COBOL (Common Business OrientedLanguage) programming language. These applications were very robust, andthey were used successfully in early information systems. They are referred to ustoday as legacy systems.1.2.1.File SystemsFile systems are used to store and supply data to specific information systems.For instance, a sales data file stores data used by the sale information system.The accounting data files support the accounting information system. A file system (illustrated in Figure 1.3) as two-dimensional table is characterized by: Columns or attributes that describe a specific characteristic of the file, forexample, the salesperson’s name:NameJill Adams Records or rows where the data occurrences appear, for example:24/7/16ARma Co.0343459007643.12Jill Adams037665233 Fields that describe each cell in the two-dimensional table, for example:24/7/16ARma Co.0343459007643.12Jill Adams037665233

8Database Management SystemsSales File rsonSalesperson'sTelephone24/7/16ARma Co.0343459007,643.12 Jill Adams03766523324/7/16Belm Inc.03765437719,652.88 Nick Manner03366523427/7/16RealTrack0357234423,452.76 Grace Ramos 03777529828/7/16ARma Co.03434590112,623.76 Grace Ramos 03777529828/7/16RealTrack0357234429,231.80 Sam Koori03977166329/7/16Belm Inc.0376543773,887.23 Jill Adams037665234Salesperson File SystemNameTelephone 1Jill Adams035663452Telephone 2OfficeTOTAL SALESHire Date037665233F3345356,435.30Nick Manner03457762323/12/13F8743436,652.90Grace Ramos0378872342/5/15G5432345,523,8218/8/15Dorian LeeSam 90,887.23Rio 298037665234Figure 1.3. File Systems.File systems have a strong dependency, which is explained as a complex process to update their

9.2.2. Building a Database Application in MS-Access 228 9.2.3. Building a Database Application in MariaDB 230 Chapter 10 DataBases in the Business World 241 10.1. Business Challenges in the Global Economy 241 10.2. Business Intelligence 242 10.2.1. A Framework for Business Intelligence