DBDI/ Lecture 20 Databases, Study notes of Mobile Computing

Detail Summery about DB Application Development, Stages of the Database System Development Lifecycle, Restricted Groupings – HAVING clause, System Definition, System Definition/cont.: DB application with multiple user views, Requirements Collection

Typology: Study notes

2010/2011

Uploaded on 09/08/2011

rossi46
rossi46 🇬🇧

4.5

(10)

313 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
DBDI 30/05/2007
Lecture-20 / DBs & WWW 1
Dr. Ala Al-Zobaidie
The slides are based on the textbook Database Systems by Thomas Connolly & Carolyn Begg
& other textbooks as referenced on slides
DBDI/ Lecture 20
Databases, the WWW & XML
30-May-07 DBDI / DBs & WWW 1
Objectives
Client Server and the need for Web DBs
Basics of Internet, Web, HTTP, HTML, URLs
HTTP Protocol & HTML language
Static and Dynamic Web Pages
Requirements for Web-DBMS Integration
Web Environment: 3-tier Architecture, Functions , Languages & Web Services
Examples of various platforms
Advantages & Disadvantages of Web-DBMS Approach
Structured, Semi-structured, & Unstructured data
XML: history, model, types, applications
DTD, XML Schema & Data Manipulation
XML Documents & Databases
XML & SQL
Advantages of XML
30-May-07 DBDI / DBs & WWW 2
In the bad old days – Dumb terminal
speaking to inflexible mainframe
I don’t know
nothing
You get the data
my way – or it’s
the highway!
Perhaps Telnet –
so not too many all
at once, please
30-May-07 DBDI / DBs & WWW 3
Getting the Data Out: Client Server
Complex Interpretive software
And Deployment Problems
Data
30-May-07 DBDI / DBs & WWW 4
Getting the Data Out: Client Server
Complex Interpretive software
And Deployment Problems &
And Vendor Lock in
Data
30-May-07 DBDI / DBs & WWW 5
Getting the Data Out: 3 tier architecture
Data
Web Server
pf3
pf4
pf5
pf8

Partial preview of the text

Download DBDI/ Lecture 20 Databases and more Study notes Mobile Computing in PDF only on Docsity!

Dr. Ala Al-Zobaidie

The slides are based on the textbook Database Systems by Thomas Connolly & Carolyn Begg& other textbooks as referenced on slides

DBDI/ Lecture 20

Databases, the WWW & XML

30-May-07 (^) DBDI / DBs & WWW 1

Objectives

  • Client Server and the need for Web DBs
  • Basics of Internet, Web, HTTP, HTML, URLs
  • HTTP Protocol & HTML language
  • Static and Dynamic Web Pages
  • Requirements for Web-DBMS Integration
  • Web Environment: 3-tier Architecture, Functions , Languages & Web Services
  • Examples of various platforms
  • Advantages & Disadvantages of Web-DBMS Approach
  • Structured, Semi-structured, & Unstructured data
  • XML: history, model, types, applications
  • DTD, XML Schema & Data Manipulation
  • XML Documents & Databases
  • XML & SQL
  • Advantages of XML

30-May-07 (^) DBDI / DBs & WWW 2

In the bad old days – Dumb terminal

speaking to inflexible mainframe

I don’t knownothing

You get the datamy way – or it’s the highway!

Perhaps Telnet –so not too many all at once, please

30-May-07 (^) DBDI / DBs & WWW 3

Getting the Data Out: Client Server

Complex Interpretive software And Deployment Problems

Data

Getting the Data Out: Client Server

Complex Interpretive software And Deployment Problems & And Vendor Lock in

Data

Getting the Data Out: 3 tier architecture

Data

Web Server

30-May-07 (^) DBDI / DBs & WWW 6

Improving the input/output

  • Gathering & Outputting Data into/from DB
  • Output Layout
  • From Data To Middleware
  • From Middleware to Client
  • What’s in the Middleware

30-May-07 (^) DBDI / DBs & WWW 7

  • The Web & the Internet
    • Huge DB or file based systems
    • designed to be platform-independent
    • Protocols
  • URL:
    • A unique address on the Giant Network to locate resources on the network
  • Mark-up Languages:
    • interact with the DB
    • most important innovation of the web was the way it defined links
    • HTML is the mark up
    • HTTP is the binary protocol that mandates how information flows

The WWW & the Internet

http://cms-stu-net.gre.ac.uk/aa01/DBDI/helloworld More Specific (^) More Specific

Protocol^ Specific HostMachine Domain^ User Defined Hierarchy

30-May-07 (^) DBDI / DBs & WWW 8

The Web

  • Web node can act in two roles:
    • as servers , providing information;
    • as clients (browsers) , requesting information.
  • Protocol to exchange information between server and browser is HTTP.
  • Success is due to its simplicity and platform- independence.
  • Users & Documents: 2 billion users & 3.5 billion documents by 2010
  • Intranet vs. Extranet 30-May-07 (^) DBDI / DBs & WWW 9

Basic Components of Web Environment

HTTP & HTML

  • Hyper-Text Transfer Protocol
    • amalgamation of FTP, gopher, WAIS and many more
    • hyperlinks linking now familiar web pages
  • HTTP is a Stateless protocol
    • unsuitable for database applications
    • Solutions:
      • Send all state info backwards & forwards each time
      • Store state info on the server & send an identifier to it with each request
  • HTML
    • A formatting, simple, powerful, platform-independent document language

Static and Dynamic Web Pages

• HTML Î

Static Web page.

  • Dynamic Web page
    • generated each time it is accessed.
    • Can respond to user input from browser;
    • Can be customized by and for each user.
  • Requires hypertext to be generated by servers.
  • on-the-fly’ conversions

30-May-07 (^) DBDI / DBs & WWW 18

Web Server Standards and Languages

From Database Processing by David Kronke, Prentice Hall 2000 30-May-07 (^) DBDI / DBs & WWW 19

Web Services

  • Collection of functions into a single entity
  • Important for building applications & business processes for heterogeneous applications.
  • Based on open standards
  • Web services are browsers independent.
  • Technologies & Standards
    • XML, SOAP, WSDL, UDDI
  • Examples:
    • Stock quote facility
    • Microsoft MapPoint Web service

30-May-07 (^) DBDI / DBs & WWW 20

Java 2 Platform

30-May-07 (^) DBDI / DBs & WWW 21

JDBC

Active Server Pages (ASP)

Server machine

How ASPs work

Client machine Browser

Web server

ASP.DLL

3

4 page.asp

2

  1. The browser requests anASP page from the 1

server. As a result of click on a link. As a result of a form submit.

  1. The server retrieves the page.
  2. Server uses the ASP processor (for Windows this will be ASP.DLL) to interpret the code.
  3. The resulting HTML is sent to the browser.

30-May-07 (^) DBDI / DBs & WWW 24

.NET Framework

30-May-07 (^) DBDI / DBs & WWW 25

Advantages of Web-DBMS Approach

  • DBMS advantages
  • Simplicity
  • Platform independence
  • Graphical User Interface
  • Standardization
  • Cross-platform support
  • Transparent network access
  • Scalable deployment
  • Innovation

30-May-07 (^) DBDI / DBs & WWW 26

Disadvantages of Web-DBMS Approach

  • Reliability
  • Security
  • Cost
  • Scalability
  • Limited functionality of HTML
  • Statelessness
  • Bandwidth
  • Performance
  • Immaturity of development tools

30-May-07 (^) DBDI / DBs & WWW 27

Structured, Semi-structured, & Unstructured

data

  • Structured data
    • Stored in DB
    • Strict format
    • Limitation
  • Semi-structured data
    • Not identical structure
    • Entities could have different attributes

• Unstructured data

  • limited data type

Semi-structured data

  • Differences between semi-structured, structured & unstructured data

From Fundamentals of Database by Elmasri and Navathe, 2007

XML History Development

  • XML was created in 1996 to overcome limitations in SGML and HTML
  • SGML is large and complicated
  • HTML fails to separate structural, semantic, and formatting meta-data, and is not always “well- formed”
  • XML has not supplanted HTML in web browsers, but is used in other areas, especially data interchange

30-May-07 (^) DBDI / DBs & WWW 36

DTD example

An XML DTD file called projects

30-May-07 (^) DBDI / DBs & WWW 37

Limitations of DTDs

  • First, the data types in DTD are not very general.
  • Second, DTD has its own special syntax
  • Third, all DTD elements are always forced to follow the specified ordering the document

30-May-07 (^) DBDI / DBs & WWW 38

XML Schema & Data Manipulation

  • XML Schema is an XML derivative, and can be interpreted by XML parsers
  • It is considerably more prolix
  • XML can enforce primitive types and some derived types
  • XML types have essentially no operators because “types” are still character strings
  • XML Data Manipulation
    • XQuery is based on Xpath
    • XQuery supports “select, project, and join”
    • XUpdate will support updates 30-May-07 (^) DBDI / DBs & WWW 39

XML Documents & Databases

Storing XML Doc in a DB: three-four approaches

  1. Store XML documents as attributes
    • data type CLOB
    • efficient insertion & retrieval of documents
    • Update: not so simple
  2. Shred documents into attributes & relations
    • shred into elements and data distribute over number of attributes in one or more relations
    • easier to index & update
  3. Store XML documents in “XML databases” in a schema- Independent form
    • Could use DOM to represent structure
    • recursive structure can cause performance problems
  4. Store the XML in a Parsed form

XML & SQL

  • XML Collection will offer support for shred and publish, where the publish feature supports publishing the XML data, and its schema
  • XML Column will offer a new built-in type, XML that will come an XMLGEN operator to publish XML documents
  • Database vendors offer built-in functions that can read and write elements within XML attribute values, e.g., XMLFILETOCLOB

Advantages of XML

  • Simplicity
  • Open standard and platform/vendor-independent
  • Extensibility
  • Reuse
  • Separation of content and presentation
  • Improved load balancing
  • Support for integration of data from multiple sources
  • Ability to describe data from a wide variety of applications
  • More advanced search engines
  • New opportunities.

30-May-07 (^) DBDI / DBs & WWW 42

Summary

  • Internet, Web, HTTP, HTML, URLs, etc.
  • Static and Dynamic Web Pages & Protocols
  • Requirements for Web-DBMS Integration
  • Web Environment: Architecture, Functions , Languages & Web Services
  • various platforms
  • Advantages & Disadvantages of Web-DBMS Approach
  • Structured, Semi-structured, & Unstructured data
  • XML & its Advantages