Download presentation
Presentation is loading. Please wait.
Published byDorthy Francis Modified over 9 years ago
1
Database Processing Applications and Business Intelligence Chapter Seven DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition
2
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-2 Chapter Objectives Understand and be able to set up Web database processing Learn the basic concepts of Extensible Markup Language (XML) Learn the basic concepts of business intelligence (BI) systems Learn the basic concepts of OLAP and data mining
3
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-3 Heather Sweeney Designs: Database Design
4
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-4 Heather Sweeney Designs: HSD Database Diagram in SQL Server 2005
5
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-5 Database Processing Environment A database processing environment is complicated and multi-faceted –Multiple users –Multiple queries –Multiple forms –Multiple reports –Multiple application programs
6
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-6 The Database Processing Environment
7
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-7 Queries, Forms, and Reports Microsoft Access is being used to create forms and reports for a database running in SQL Server 2005 Express Edition
8
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-8 Processing Constraints Enforcing referential integrity Cascading deletion Cascading modifications Data type constraints Data size constraints Data value constraints Null constraints Uniqueness constraints
9
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-9 Triggers and Stored Procedures A trigger is a stored procedure that is automatically invoked by the DBMS when a specified activity occurs –BEFORE, AFTER and INSTEAD OF A stored procedure is a module similar to subroutine or function that performs database actions –Stored in the database itself
10
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-10 Internet Application Processing Internet Application Processing is more complicated than traditional application processing Specifically, with Internet Application Processing … –The network becomes an integral part of the application
11
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-11 Internet Application Processing Environment
12
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-12 APIs Every DBMS product has an application program interface (API) –An API is a collection of objects, methods, and properties for executing DBMS functions from program code –Each DBMS has its own API, and APIs vary from one DBMS product to another. To simplify this situation, the computer industry has developed standards for database access API interface standards are used to make it easier for programmers – they write to the interface standard instead of the DBMS API –ODBC – Open Database Connectivity –JDBC – Java Database ConnectivityJava Database Connectivity
13
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-13 OBDC and OLE DB The Open Database Connectivity (ODBC) standard was developed in the early 1990sOpen Database Connectivity (ODBC) –Provides a DBMS-independent means for processing relational database data OLE DB was created by Microsoft in the mid- 1990sOLE DB –An object-oriented interface –Encapsulates data-server functionality –Designed not just for access to relational databases, but also for accessing many other types of data as well –Readily accessible to programming languages such as C, C#, and Java –Not as accessible to Visual Basic and scripting languages
14
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-14 ADO and ADO.NET Microsoft developed Active Data Objects (ADO)Active Data Objects (ADO) –A set of objects for utilizing OLE DB –Designed for use by any language, including VB, VBScript, and Jscript ADO has been followed by ADO.NETADO.NET –An improved version of ADO developed as part of Microsoft’s.NET initiative
15
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-15 ODBC, OLE DB, and ADO in the Web Database Processing Environment
16
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-16 N-Tier Architecture Tiers refers to the number of computers involved in the Web database application –The workstation with Web browser is the first tier –Two-tier architecture means that the Web server and the DBMS are on the same server –Three-tier architecture means that the Web server and the DBMS are on separate servers
17
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-17 Typical Web Server Setups Microsoft Windows Linux or Unix Web ServerInternet Information Server (IIS) Apache Scripting Languages (Interpreted ASP Pages with VBScript or JScript (PHP also works) PHP Object Oriented Languages (Complied) ASP.NET pages with VisualBasic.Net, C#.Net or others JSP pages with Java (Also see the Mono project)Mono
18
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-18 Typical Web DBMS Servers Microsoft Windows Linux or Unix Web ServerInternet Information Server (IIS) Apache DBMSsMicrosoft SQL Server Oracle MySQL API Interface Standard ODBCJDBC
19
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-19 ODBC: Three-tier Web Server Architecture
20
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-20 ODBC Architecture The application program, the ODBC driver manager, and the ODBC DBMS driver all reside on the Web server The DBMS driver sends requests to data sources on the database server –A data source is the database, its associated DBMS, operating system, and network platform
21
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-21 ODBC Architecture: The Application Program The application program issues requests –To create a connection with a data source –To issue SQL statements and receive results –To process errors –To start, commit, and roll back transactions ODBC –Provides a standard means for each of these requests –Defines a standard set of error codes and messages
22
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-22 ODBC Architecture: The ODBC Driver Manager The ODBC driver manager –Serves as an intermediary between the application and the DBMS drivers –When the application requests a connection, the driver Determines the type of DBMS that processes a given ODBC data source Loads the appropriate driver into memory (if it is not already loaded)
23
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-23 ODBC Architecture: The ODBC Driver A ODBC driver –Processes ODBC requests –Submits specific SQL statements to a given type of data source There is a different driver for each data source type It is the responsibility of the driver to ensure that standard ODBC commands execute correctly –Converts data source error codes and messages into the ODBC standard codes and messages
24
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-24 ODBC Architecture: ODBC Data Sources An ODBC data source –Is an ODBC data structure that identifies a database and the DBMS that processes it –There are three types of data sources A file data source is a file that can be shared among database users—The only requirement is that the users have the same DBMS driver and privilege to access the database. A system data source is one that is local to a single computer—The operating system and any user on that system (with proper permissions) can use a system data source A user data source is available only to the user who created it –Each created data source is given a data source name (DSN) that is used to reference the data source.
25
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-25 ODBC Architecture: Creating an ODBC Data Source I
26
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-26 ODBC Architecture: Creating an ODBC Data Source II
27
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-27 ODBC Architecture: Creating an ODBC Data Source III
28
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-28 IIS: The wwwroot Folder
29
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-29 IIS: The IIS Management Program
30
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-30 IIS: The IIS Localstart Web Page
31
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-31 Web Pages: HTML Code for default.htm Heather Sweeney Designs Demonstration Pages Home Page Database Concepts (3rd Edition) David M. Kroenke (University of Washington) David J. Auer (Western Washington University) Welcome to the Heather Sweeney Designs Home Page Chapter 7 Demonstration Pages from Figures in the Text: Example 1: Display the SEMINAR Table (No surrogate key)
32
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-32 Web Pages: The default.htm Web Page
33
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-33 Web Pages: The ReadSeminar.asp Web Page
34
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-34 Active Data Objects (ADO): Abstractions, Objects and Collections An abstraction is a generalization of something – ODBC interfaces are abstractions of native DBMS access methods When we abstract something, we lose detail, but we gain the ability to work with a broader range of types An object-oriented programming object is an abstraction that is defined by its properties and methods –Properties represent characteristics or attributes of the object –Methods are actions that the object can perform A collection is an object that contains a group of other objects –Being an object, a collection has properties and methods –In ADO, collections are named as the plural of the objects they collect One of the properties of all collections is Count, which is the number of objects in the collection. An important method of a collection is an iterator, which is a method that can be used to pass through or otherwise identify the items in the collection
35
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-35 Active Data Objects (ADO): The ADO Object Model I
36
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-36 Active Data Objects (ADO): The ADO Object Model II The Connection object is the first ADO object to be created and is the basis for the others From a connection, a developer can create one or more RecordSet objects and one or more Command objects –Each RecordSet object has a Fields collection Each Field element corresponds to a column in the recordset –Each Command object has a Parameters Collection Contains Parameter objects which are the parameters needed by the command In the process of creating or working with any of these objects, ADO will place any errors (error objects) that are generated in the Errors collection
37
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-37 Active Data Objects (ADO): ADO Constants in the ADOVBS.inc File Isolation levels
38
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-38 Active Data Objects (ADO): ADO Constants in the ADOVBS.inc File Cursor types
39
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-39 Active Data Objects (ADO): ADO Constants in the ADOVBS.inc File Lock types
40
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-40 Active Data Objects (ADO): Referencing the ADOVBS.inc File Adovbs.inc is referenced in this line
41
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-41 Active Data Objects (ADO): The Connection Object The ADO adXactReadCommitted isolation level in Adovbs.inc is referenced in this line
42
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-42 Active Data Objects (ADO): The RecordsetObject The ADO adOpenStatic cursor type Adovbs.inc is referenced in this line The ADO adLockReadOnly lock type in Adovbs.inc is referenced in this line
43
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-43 Active Data Objects (ADO): The Fields Collection The ADO Count property The ADO iteration method
44
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-44 Active Data Objects (ADO): The Errors Collection In current code: More complete version:
45
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-45 Database Processing with XML Extensible Markup Language (XML) is a standard for defining the structure of documents and communicating the documents among computers It provides user definable tags that can be used in Web pages and other documents
46
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-46 Sample XML document
47
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-47 XML Schema Documents XML schema documents define allowable tags and their relationships
48
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-48 XML Document Validation An XML document can declare the name and location of the schema that defines its tags XML documents that conform to their XML schemas are schema-valid documents XML schema documents are XML documents, and can be validated against their designated schema The “Schema of all schemas” is at www.w3.org/2001/XMLSchema www.w3.org/2001/XMLSchema
49
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-49 Sample XML Schema
50
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-50 XML and Database Processing DBMS programs are incorporating means to read and create XML documents SQL Server 2005 example: SELECT * FROM ARTIST FOR XML AUTO, ELEMENTS;
51
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-51 SQL for XML Processing SQL statement using XML The results are in one cell
52
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-52 Results of SQL for XML Processing The expanded results
53
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-53 Text Results of SQL for XML Processing
54
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-54 XLM Web Services XML Webs Services allows application functionality on one Web server to be shared and incorporated into Web applications on other Web servers
55
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-55 Business Intelligence Systems Business intelligence (BI) systems are information systems that –Assist managers and other professionals in the analysis of current and past activities and in the prediction of future events –Do not support operational activities, such as the recording and processing of orders These are supported by transactin proccessing systems –Support management assessment, analysis, planning, and control BI systems fall into two broad categories –Reporting systems that sort, filter, group, and make elementary calculations on operational data –Data mining applications that perform sophisticated analyses on data, analyses that usually involve complex statistical and mathematical processing
56
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-56 The Relationship Among Operational and BI Applications
57
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-57 OLAP and Data Mining OnLine Analytical Processing (OLAP) is a technique for dynamically examining database data –OLAP uses arithmetic functions such as Sum and Average Data Mining is a mathematically sophisticated technique for analyzing database data –Data mining use mathematical and statistical techniques
58
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-58 OLAP OLAP uses a table called an OLAP cube The OLAP cube uses inputs called dimensions The OLAP cube calculates outputs called measures
59
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-59 Sample OLAP Cube
60
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 7-60 Data Mining Techniques Data Mining mathematical and statistical techniques include: –Cluster analysis –Regression analysis –Time-series analysis –Factor analysis –Nonparametric Monte Carlo analysis
61
Database Processing Applications and Business Intelligence End of Presentation on Chapter Seven DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.