0% found this document useful (0 votes)
66 views51 pages

Mod15 Web 1

This chapter covers database connectivity and web technologies, detailing standard interfaces like ODBC, OLE, ADO.NET, and JDBC for application-database communication. It discusses the role of web application servers, middleware, and XML in web database development, along with the advantages of cloud computing for database services. Key concepts include the functionalities of different connectivity technologies, the integration of databases with the Internet, and the importance of XML and web application servers in facilitating data access and management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views51 pages

Mod15 Web 1

This chapter covers database connectivity and web technologies, detailing standard interfaces like ODBC, OLE, ADO.NET, and JDBC for application-database communication. It discusses the role of web application servers, middleware, and XML in web database development, along with the advantages of cloud computing for database services. Key concepts include the functionalities of different connectivity technologies, the integration of databases with the Internet, and the importance of XML and web application servers in facilitating data access and management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Database

Systems:
Design,
Implementation,
and
Management,
14e
Module 15: Database
Connectivity and Web
Technologies

1
Chapter Objectives

By the end of this chapter, you should be able to:

1. Explain the purpose of standard database connectivity interfaces

2. Describe the functionality and features of various database connectivity


technologies: ODBC, OLE, [Link], and JDBC

3. Describe how web-to-database middleware is used to integrate databases with the


Internet

4. Identify the services provided by web application servers

5. Explain how Extensible Markup Language (XML) is used for web database
development

6. Describe the advantages and disadvantages of using cloud computing for the
database-as-a-service model
2
Database Connectivity (1/2)

• Database connectivity refers to the


mechanisms through which application
programs connect and communicate
with data repositories

• Database middleware/connectivity
software provides an interface
between the application program and
the database (Also called CGI)
− NOTE: a single database
connectivity middleware (ex. ODBC)
should support multiple data sources
simultaneously Oracle MySQL Access

3
Database Connectivity (2/2)

• Universal Data Access (UDA) is a collection of technologies used to access any type
of data source and manage the data through a common interface
− ODBC, OLE-DB, and [Link] form the backbone of Microsoft’s UDA architecture

• ODBC stands for Open Database Connectivity. It is the most common interface to
access database by outside applications

Source:
[Link]
terms/what-is-odbc/
4
Native SQL Connectivity

• Native SQL connectivity refers to the


connection interface provided by database
vendors, which is unique to each vendor

• Native database connectivity interfaces are


optimized for a particular vendor’s DBMS

• Maintaining multiple native interfaces for


different databases can become a burden for
the programmer

• All DBMS provides native connectivity, and


from the native interface, all the features of
the DBMS are available, but at the cost of
having to maintain one interface per vendor. Oracle MySQL Access

5
ODBC, DAO, and RDO (1 of 2)

• Open Database Connectivity (ODBC) is Microsoft’s implementation standard for


database access
− ODBC is a widely supported database connectivity interface that allows Windows
application to access relational data sources by using SQL via standard
application programming interface (API)

• Data Access Objects (DAO) is an object-oriented API used to access desktop


databases such as MS Access

• Remote Data Objects (RDO) is a higher-level object-oriented application interface


used to access remote database servers (ex: web servers)
 RDO is optimized to deal with server-based databases

6
ODBC, DAO, and RDO (2 of 2)
TOP layer

MIDDLE
[ODBC, OLE-
DB, ADO or
JDBC]

Bottom layer
SOURCE Figure 15.2 Using ODBC, DAO, and
(Database) RDO to Access Databases

7
Summary/Review Question

• What are ODBC, DAO, and RDO? How are they related?

8
ODBC Components

• A high-level ODBC API through which application


programs access ODBC functionality (user
interacts here).

• A Driver Manager component that is in charge of


managing/oversees all database connections.

• An ODBC Driver component that talks directly to


the DBMS (data source). The driver must be
provided by the vendor.

9
Summary/Review Question

• What are the three basic components of the ODBC architecture?

10
Review

• ODBC, DAO, and RDO are all technologies used for accessing databases using
Windows, but they have different strengths and weaknesses.
− ODBC (Open Database Connectivity) is a standard API that allows applications to
connect to various databases using individual database drivers.
− DAO (Data Access Objects) is primarily designed for accessing desktop
databases like Microsoft Access
− RDO (Remote Data Objects) is optimized for accessing remote SQL databases
through ODBC

11
Review/Summary Question

• What is the difference between DAO and RDO?

12
OLE-DB (1 of 2)

• Object Linking and Embedding for Database (OLE-DB) is a database middleware that
adds object-oriented functionality for access to relational and nonrelational data

• OLE-DB is composed of a series of COM (Component Object Model) objects that


provide low-level database connectivity for applications

• ODBC and OLE DB are both technologies for accessing data from databases,
but OLE DB is generally considered a more modern and versatile successor to ODBC

• NOTE: OLE DB was introduced by Microsoft as a more versatile alternative to ODBC,


designed to handle a wider array of data sources, including non-relational ones like
spreadsheets and object databases.

13
OLE-DB (2 of 2)

• OLE-DB does not provide support for


scripting languages like PHP, Python,
etc.
− A script is written in a programming
language that is not compiled but is
interpreted and executed at run time

• ActiveX Data Objects (ADO) provides a


high-level, application-oriented interface
to interact with OLE-DB, DAO, and RDO
− ADO also provides a unified interface
to access data from any
programming language that uses
the underlying OLE-DB objects Figure 15.5 OLE-DB Architecture
14
Summary/Review Question

• How does ADO complement OLE-DB?

15
Java Database Connectivity (JDBC)

• Java Database Connectivity (JDBC)


is an application programming interface
(API) that allows a Java program to
interact with a wide range of data
sources

• The following are advantages of JDBC:


− It allows direct access to a database
server
− It provides a way to connect to
databases through an ODBC driver
− Use JDBC to run database
connectivity on many environments Figure 15.7 JDBC Architecture

16
Summary/Review Question

• What is JDBC, and what is it used for?

17
Database Internet Connectivity
• Internet database connectivity has the following advantages:
− Allows companies to bring new services and products to market quickly
− Increases customer satisfaction through the creation of innovative online services
− Allows anywhere, anytime data access using mobile smart devices via the Internet

18
Web-to-Database Middleware: Server-
Site Extensions
• The web server is the main hub through
which Internet services are accessed

• A server-side extension is a program


that interacts directly with the web server
to handle specific types of requests

• A server-side extension called web


application services, provides links to
databases, search engines, etc.

• A web application server, using


CGI/scripts, can provide tools to
authenticate and session management Figure 15.8 Web-to-Database
Middleware

19
Web Server Interfaces

• Currently, there are two well-defined web A


server interfaces: P
I

− Common Gateway Interface (CGI) uses


script files that perform specific functions
based on the client’s parameters that are
passed to the web server (CGI scripts can
be written in Python, PHP, etc.)
− Application programming interface
(API) is treated as part of the web server
program that is dynamically invoked when
needed (A good API makes it easy to Source:
develop a program by providing all the [Link]
building blocks) programming

20
Optional Summary

• In the database query scenario, the web server generates the webpage contents
before it sends the page to the client web browser.

• Extending the web server functionality implies that the web server and the web-to-
database middleware will properly communicate with each other.

• A CGI uses the instruction in a script to return a web page

• The CGI receives its requests from a remote client. A CGI starts a new process with
each request. Each request made to the CGI can be slow since it requires starting a
script language interpreter and running an independent program on the server.

21
CGI vs. DLL
• CGI (Common Gateway Interface) and DLL (Dynamic Link
Library) are both technologies used in web development,
but they serve different purposes.

• CGI is a standard interface for executing scripts on a web


server

• CGI invokes an external program to execute the script


file DLL Code Libraries

• A CGI uses the instruction in a script to return a web


page A CGI starts a new process with each
request.
• DLLs are libraries of code that can be reused by multiple Each request made to the CGI can be
applications. slow since it requires starting a script
language interpreter and running an
• In essence,
independent program on the server.
− CGI is about how a web server interacts with external Then the generated web page is returned
programs, and
22
The Web Browser

• The web browser is software that lets users navigate the web from their client
computer
− It’s job is to interpret HTML code received from the web server and present the
various page components in standard formatted way
− When an end user uses a web browser to dynamically query a database, the
client browser requests a web page from the web server
− The web browser provides a free access tool to the services that does not
require development.

• The web is a stateless system


− A stateless system is a system in which a web server does not know the status
of the clients communicating with it

23
Client-Side Extensions

• Client-side extensions add functionality to the web browser

• A plug-in is an external application automatically invoked by the browser when


needed

• JavaScript is a scripting language that allows web authors to design interactive


sites
− JavaScript code is embedded in the web page and executed after a specific
event

• ActiveX is Microsoft’s alternative to Java


− With ActiveX it is not possible to use the same solution on non-windows
machines

• Scripting language enables database interaction. The web server passes the
script to the web-to-database middleware. It reduces the load on the server side 24
Web Application Servers (1 of 2)

• A web application server is a middleware application that expands the


functionality of web servers by linking them to a wide range of services

• Web application servers can be used to perform the following:


− Connect to and query a database from web page
− Present database data in a webpage using various formats
− Create dynamic web search pages
− Create webpages to insert, update, and delete data
− Enforce referential integrity in the application program logic
− Use simple and nested queries and programming logic to represent business
rules
− Generate the webpage contents before it sends the page to the client browser
25
Web Application Servers (2 of 2)

• Web application servers provide features such as the following:


− An integrated development environment
− Security and user authentication
 provides security and authentication of users through user IDs and
passwords
− Computational languages
− Automation generation of HTML pages
− Performance and fault -tolerant features
− Database access with transaction management capabilities
− Access to multiple services, such as file transfers (FTP), database connectivity,
email, and directory services
26
Web Database Development

• Web database development deals with the process of interfacing databases with the
web browser
− In short, how to create webpages that access data in a database

• Web application servers that has database access with transaction management
capabilities include the following:
− ColdFusion/JRun
− PHP
− [Link]

27
Summary/Review Question

• What is a web application server, and how does it work from a database
perspective?

28
Extensible Markup Language (XML)

• Extensible Markup Language (XML) is a meta-


language used to represent and manipulate data
elements
− Facilitates the exchange of structured
documents over the Internet

• The XML meta-language allows the definition of new


tags

• Additional characteristics include the following:


− It is case sensitive
− You can use the <-- and --> symbols to enter
comments in the XML document

29
Summary/Review Question

• What is XML? Why is it useful?

30
Document Type Definitions (DTD) and
XML Schemas
• A document type definition (DTD) is a file with .dtd extension that describe XML
elements

• A DTD file provides the composition of database’s logical model and defines the
syntax rules or valid tags for each type of XML document

• Companies engaging in e-commerce transactions must develop and share DTDs

• To be able to use a DTD file to define elements within an XML document, the DTD
must be referenced from inside that XML document

• DTD is not always required for an XML file

• The XML schema definition or XSD is an advanced data definition language that
is used to describe the structure of XML data documents

31
XML example
note
to Tove
from Jani
heading Reminder
body Do not forget me this weekend!
Table representing the XML

• The top line is required


declaration <?xml
version="1.0"?>

• You can think note as the


table name and (to, from,
heading, body) as attributes.

• The root element is note

• With XML, you can transfer


the data from one database
to another via web

32
XML example
XML Comments
<?xml version = "1.0"?> Declaration
<message> Root element is required
<to> tag start
Alex Data
</to> tag end
<from>
Rose Data
</from>
<content> Element
<heading> Sub-element
Reminder
</heading>
<body>
Monday arrive new
products
</body>
</content> Element
</message>

33
XML example

• Write a complete XML (DTD and XML) for the following

STUDENT
ID 300012121
FNAME John
LNAME Smith

ADDRESS
NUMBER 33121
STREET King Rd
CITY Abbotsford
POSTAL V2S 7M8

34
XSL

• XSL (eXtensible Stylesheet Language) is a styling language for XML.

• XSLT stands for XSL Transformations.

• Use XSLT to transform XML documents into other formats (like transforming XML
into HTML)

• XSLT is commonly used for:


− Generating web pages by transforming XML data into HTML or XHTML.
− Creating various document formats from XML, including PDFs and other
printable outputs.
− Performing data manipulation and restructuring on XML documents.

35
XML Applications

• The following applications lend themselves particularly well to XML:


− Business to Business (B2B) exchanges
− Web page development
− Database support
− XML databases
− XML services

36
Cloud Computing Services

• Cloud computing is a computing model


that enables access to a shared pool of
configurable computer resources The term
cloud services is used in this book to
refer to the services provided by cloud
computing

• Cloud computing advantages are


− It eliminates financial and technological
barriers
− Organizations can leverage database
technologies in their business
processes with minimal effort and cost
Figure 15.21 Cloud Services

37
Summary/Review Question

• What is cloud computing?

38
Characteristics of Cloud Services

• The prevalent characteristics of cloud services include the following:


− Availability: available anywhere via Internet technologies
− Shared infrastructure- reduces cost of using cloud services
− Lower startup costs- do not need to buy hardware or software when starting
− Managed operations- cloud service company will maintain the infrastructure

39
Summary/Review Question

• Mention and describe two main characteristics of cloud services?

40
Types of Cloud Services

• Cloud services categories:


− Software as a Service (SaaS) –the
cloud service provider offers ready
applications that run in the cloud
(Zoom)
− Platform as a Service (PaaS) – the
cloud service provider can build and
deploy consumer-created applications
using the provider’s cloud
infrastructure
− Infrastructure as a Service (IaaS) –
a model in which the cloud service
Figure 15.23 Types of Cloud
provider offers consumers the ability to
Services
provision their own resources on 41
Summary/Review Question

• Explain one of the cloud services categories (Saas, PaaS, IaaS).

42
Cloud Services: Advantages and
Disadvantages
ADVANTAGES DISADVANTAGES
− Low initial cost of entry − Issues of security, privacy, and
compliance
− Support for mobile computing
− Data migration, from local to cloud,
− Anywhere access
is a difficult and lengthy process
− Managed infrastructure
− Complex licensing schemes
− Loss of ownership and control
− Difficult integration with internal IT
system

43
Summary/Review Question

• What is one advantage and one disadvantage of cloud service.

44
SQL Data Services (1 of 2)

• SQL data services (SDS) refers to cloud computing-based data management


services that provide
− relational data storage, access, and management to companies of all sizes

• This type of service provides some unique benefits:


− Hosted data management and standard protocols
− A common programming interface

• Examples
− Google Cloud SQL, Salesforce, Amazon RDS (Relational Database Service). Etc.

45
SQL Data Services (2 of 2)

• Advantages of SQL data services include the following:


− Reliable and scalable at a lower cost than in-house systems
 handle increasing amounts of data, users, and requests without significant
performance degradation
− High level of failure tolerance
 designed to continue operating without interruption, even when faced with hardware
or software failures
− Dynamic and automatic load balancing
 involves distributing incoming database requests across multiple servers
− Automated data backup and disaster recovery are included

46
Summary/Review Question

• Define SQL data services and list one of its advantages.

47
Summary

Now that the lesson has ended, you should be able to:

1. Explain the purpose of standard database connectivity interfaces

2. Describe the functionality and features of various database connectivity


technologies: ODBC, OLE, [Link], and JDBC

3. Describe how web-to-database middleware is used to integrate databases with the


Internet

4. Identify the services provided by web application servers

5. Explain how Extensible Markup Language (XML) is used for web database
development

6. Describe the advantages and disadvantages of using cloud computing for the
database-as-a-service model
48
Review Questions
Assignment 11
• Review Questions
− Questions covered in this PPT

• Assignment Problems
− Problems 8-11 (page 713)

Note: Final exam is based on Review and assignment questions. These questions are
at the back of every chapter.

49
Post Class Summary

• Please post the answers to the summary questions to [Link]

• The answers must be formatted to fit in one paragraph. Do not post in bullet points.

50
Prelim 11

• If time permits, you will work on assignment within your groups.

51

You might also like