advanced topics chapter seven david m. kroenke’s database concepts, 2 nd edition

25
Advanced Topics Chapter Seven DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition

Post on 22-Dec-2015

220 views

Category:

Documents


3 download

TRANSCRIPT

Advanced Topics

Chapter Seven

DAVID M. KROENKE’S

DATABASE CONCEPTS, 2nd Edition

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-2

Chapter Objectives

Understand the nature, need and importance of the following topics:

Web database processing Database processing with XML Distributed database processing OLAP and data mining Object-relational database management

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-3

Web Database Processing

• Client computers use browsers

• Web server communicates via Hypertext Transfer Protocol (HTTP) and scripting / programming languages to browsers and DBMS

• DBMS communicates with database

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-4

Web Database Processing Environment

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-5

N-Tier Architecture

• Tiers refers to the number of computers involved in the Web database application– The user’s workstation with its’ 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

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-6

Typical Web Server Setups

Microsoft

Windows

Linux or Unix

Web Server Internet 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)

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-7

Typical Web DBMS Servers

Microsoft

Windows

Linux or Unix

Web Server Internet Information Server (IIS)

Apache

DBMSs Microsoft

SQL Server

Oracle

MySQL

API Interface Standard

ODBC JDBC

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-8

API Interface Standards

• Every DBMS has a different application program interface (API)

• API interface standards are used to make it easier for programmers – they write to the interface standard instead of the DBMS API– OBDC – Open Database Connectivity– JDBC – Not an acronym for anything!

(in particular, not Java Database Connectivity)

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-9

Database Procesing 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

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-10

Sample XML document

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE customer SYSTEM "C:\XML Docs\customer.dtd"><customer>

<name><firstname>Michelle</firstname><lastname>Correlli</lastname>

</name><address>

<street>1824 East 7th Avenue</street><unit>Suite 700</unit><city>Memphis</city><state>TN</state><zip>32123-7788</zip>

</address></customer>

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-11

XML Schema Documents

• XML schema documents define allowable tags and their relationships

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-12

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

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-13

Sample XML Schema<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xsd:element name=“CUSTOMER-DATA"> <xsd:complexType> <xsd:sequence> <xsd:element name=“CUSTOMER"> <xsd:complexType> <xsd:sequence>

<xsd:element name="Name"/> <xsd:element name="Phone/>

<xsd:element name="Email"/> </xsd:sequence>

</xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element></xsd:schema>

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-14

XML and Database Processing

• DBMS programs are incorporating means to read and create XML documents

• SQL Server example:

SELECT *FROM ARTIST FOR XML AUTO, ELEMENTS;

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-15

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

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-16

Distributed Database Processing

• A database is distributed when it is:– Partitioned– Replicated– Both partitioned and replicated

• This is fairly straight forward for read-only replicas, but it can be very difficult for other installations

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-17

Type of Distributed Databases

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-18

OLAP and Data Mining

• OnLine Analytical Processing (OLAP) is a technique for dynamically examining database data– OLAP uses arithmetic functions (Sum, Average,

etc)

• Data Mining is a mathematically sophisticated technique for analyzing database data– Data mining use mathematical and statistical

techniques

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-19

Data Mining Techniques

• Data Mining mathematical and statistical techniques include:– Cluster analysis– Regression analysis– Time-series analysis– Factor analysis– Nonparametric Monte Carlo analysis

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-20

Object-Relational Database Management

• Object-oriented programming (OOP) is based on objects, and OOP is now used as the basis of many computer programming languages– Java– VisualBasic.Net– C++– C#

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-21

Objects

• Object classes have– Identifiers– Properties

• These are data items associated with the object

– Methods• These are programs that allow the object to perform

tasks

• The only difference between entity classes and object classes is the methods.

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-22

Object Persistence

• Object persistence means that values of the object properties are storable and retrievable

• Object persistence can be achieved by various techniques– A main technique is database

technology– Relational databases can be used, but

require substantial programming

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-23

OODBMS

• Object-Oriented DBMSs (OODBMSs) have been developed– Never achieved commercial success

• It would be too expensive to transfer existing data from relational and other legacy databases

• Therefore, the OODBMSs were not cost justifiable

DAVID M. KROENKE’S DATABASE CONCEPTS, 2nd Edition © 2005 Pearson Prentice Hall

7-24

Object-Relational DBMSs

• Some relational DBMS vendors have added object-oriented features to their products– Oracle

• These products are known as object-relational DBMSs and support object-relational databases

Advanced Topics

End of Presentation on Chapter Seven

DAVID M. KROENKE’S

DATABASE CONCEPTS, 2nd Edition