You are on page 1of 74

Chapter 3

Database Architecture and the Web

Batch: F-18IT
Subject: Database Systems
Course Facilitator:
Dr. Asghar Ali Chandio
Chapter 3 - Objectives
 Client–server architecture and advantages of this type of
architecture for a DBMS.
 Function and uses of Transaction Processing Monitors.
 Web-Services and Service-Oriented Architectures
 Distributed DBMSs
 Data Warehousing
 Cloud Computing
 DBMS Components
 Oracle Architecture
Multi-User DBMS Architectures
 Common architectures used to implement
multi-user database management systems:
– Teleprocessing

– File-server

– Client-server
Teleprocessing
 Traditional architecture.
 Single mainframe with a number of terminals attached.
 User terminals – dumb
– Incapable of functioning on their own
File-Server
 File-server is connected to several workstations
across a network.

 Database resides on file-server.

 DBMS and applications run on each


workstation.

 Disadvantages include:
– Significant network traffic.
– Copy of DBMS on each workstation.

File-Server Architecture
•The processing is distributed
about the network (LAN)

•The file-server holds the files


required by the applications and
the DBMS

•Applications and the DBMS


run on each workstation

•File-server acts as a shared hard


disk drive
Traditional Two-Tier Client-Server
 Client (tier 1) manages user interface and runs
applications. (responsible for the presentation of
data to the user)
 Server (tier 2) holds database and DBMS.
(responsible for supplying data services to the client)

 Advantages include:
– wider access to existing databases;
– increased performance;
– possible reduction in hardware costs;
– reduction in communication costs;
– increased consistency.
Traditional Two-Tier Client-Server
•The client takes the user’s request, checks the
syntax, and generates database requests in SQL

•Then transmits the message to the server, waits for a


response, and formats the response for the end-user.

•The server accepts and processes the database


requests, then transmits the results back to the client.

•The processing involves checking authorization,


ensuring integrity, maintaining the system catalog,
query and update processing.
Traditional Two-Tier Client-Server

(a) single client, single server; (b) multiple clients, single server;
(c) multiple clients, multiple servers.
Traditional Two-Tier Client-Server
Three-Tier Client-Server
 In two tier client-server, client side presented
two problems preventing true scalability:
– ‘Fat’ client, requiring considerable resources on
client’s computer to run effectively.
– Significant client-side administration overhead.

 By 1995, three layers proposed, each


potentially running on a different platform.
Three-Tier Client-Server
 The three layers:
– User interface layer
– Business logic and data processing layer:
Application Server
– DBMS-stores data required by middle tier:
Database Server

12
Three-Tier Client-Server
 Advantages:
– ‘Thin’ client, requiring less expensive hardware.
– Application maintenance is centralized with the
transfer of the business logic for many end-users
into a single application server.
– Easier to modify or replace one tier without
affecting others.
– Separating business logic from database functions
makes it easier to implement load balancing.
– Maps quite naturally to Web environment.

13
Three-Tier Client-Server

14
N-Tier Architectures
 Three tier architecture can be expanded to n-tiers.
 Middle tier could be split into two, one tier for the web server and
other tier for the application server.
 In the volume of high throughput environments, the single web
server can be replaced by a set of web servers (or a web farms) to
achieve efficient load balancing.
 Application server: Hosts an application programming interface
(API) to expose business logic and business processes for use by
other applications.
 Some examples of application server: JEE WebLogic Server,
Oracle GoldFish Server, JBoss from Red Hat, WebSphere
Application Server from IBM, and the open source Glassfish
Application Server. 15
N-Tier Architectures

16
Middleware
 Computer software that connects software components or applications
 Six main types of middleware:
– Asynchronous Remote Procedure Call (RPC): allow a client to request a
service without waiting for a response
– Synchronous RPC: while server is processing the call, the client is
blocked
– Publish/subscribe: An asynchronous messaging protocol where
subscribers subscribe to messages produced by publishers
– Message-oriented middleware (MOM): resides on both the client and
server and typically supports asynchronous calls between them
– Object-request broker (ORB): Manages communication and data
exchange between objects
– SQL-oriented data access: Connects applications with databases across
the network and translates SQL requests into native SQL or other
17
database language
Transaction Processing Monitors
 Program that controls data transfer between clients and servers
in order to provide a consistent environment, particularly for
Online Transaction Processing (OLTP).
 Middleware component that provides access to the services of
a number of resource managers (DBMSs, OS, User
interfaces, messaging software)
 Provide a uniform interface for programmers who are
developing transactional software (Software that guarantees
that all appropriate databases are updated from a single
transaction)

18
Transaction Processing Monitors
 Advantages:
– Transaction routing: increase scalability by directing
transactions to specific DBMSs
– Managing distributed transactions: manage
transactions that require access to data held in multiple,
possibly heterogeneous DBMSs.
– Load balancing: balance client request across multiple
DBMSs
– Funneling: handle large users
– Increased reliability: act as Transaction Manager,
performing necessary actions to maintain the consistency
of the database
19
TPM as middle tier of 3-tier client-server

20
Web Services
• A software system designed to support interoperable machine-to-
machine interaction over a network. Web services allow
applications to integrate with other applications across the Internet
• Web services have no user interface, instead share business logic,
data, and processes through a programmatic interface across a
network
• Developers can add the Web service to a Web page (or an
executable program) to offer specific functionality to users
• Examples:
– Microsoft Bing Maps and Google Maps Web services
– Amazon Simple Storage Service (S3)
– Geonames
– DOTS web services
– Xignite
21
Web Services: Microsoft Bing Maps and
Google Maps Web services
• Offer static map images
• Match addresses to the map, search for points
of interest, integrate maps and imagery, return
driving directions, and incorporate other
location intelligence into your Web application.

22
Web Services: Microsoft Bing Maps and
Google Maps Web services

23
Web Services: Microsoft Bing Maps and
Google Maps Web services

24
Web Services: Microsoft Bing Maps and
Google Maps Web services

25
Web Services: Amazon Simple Storage Service (S3)

• Simple web services interface


• Can be used to store and retrieve large
amounts of data from anywhere on the web
• Give developer access to the same highly
scalable, reliable, fast, inexpensive data
storage infrastructure

26
Web Services: Amazon S3

27
Web Services: Geonames

28
Web Services: DOTS web services

29
Web Services: DOTS web services

30
Web Services: Xignite

31
Web Services
• Use these technologies and standards:
– XML (extensible Markup Language).
– SOAP (Simple Object Access Protocol) – communication
protocol for exchanging structured information over the
Internet and uses a messages format based on XML
– WSDL (Web Services Description Language) protocol – based
on XML, used to describe and locate a Web service.
– UDDI (Universal Discovery, Description and Integration)
protocol – platform-independent, XML-based registry for
businesses to list themselves on the Internet.
Web Services
Web Services

Web Service Web service


2. Publish directory (UDDI)

XML WSDL
Interface documents
(WSDL) 1. Generate
Internet
3. Find
SOAP

4. Invoke XML
Interface
(WSDL)
Client
Application
34
RESTful Web services
• REST stands for REpresentational State Transfer is a web standard based
architecture and uses HTTP Protocol
• In REST Architecture everything is a resource
• RESTful web services are light weight, highly scalable and maintainable
and are very commonly used to create APIs for web-based applications
• In REST architecture, a REST Server simply provides access to resources
and REST client accesses and modifies the resources
• Four HTTP methods are commonly used in REST based architecture
– GET : Provides a read only access to a resource
– POST : Used to create a new resource
– DELETE : Used to remove a resource
– PUT : Used to update an existing resource or create a new resource
35
Web Services
• The growing success of Web services is due to a
number of factors, including those below.
– Systems can interact with one another dynamically via
standard Internet technologies.
– Services are built once and reused many times.
– Services can be implemented in any programming language.
– Service consumers do not need to worry about firewalls
because communication is carried over HTTP.
– Systems can advertise their capabilities for other systems to
use.

36
Service-Oriented Architectures (SOA)
• A business-centric software architecture for building
applications that implement business processes as sets of
services published at a granularity relevant to the service
consumer
• Services can be invoked, published, and discovered, and are
abstracted away from the implementation using a single
standards-based form of interface
• What makes Web services designed for SOA different from
other Web services is that they typically follow a number of
distinct conventions

37
Service-Oriented Architectures (SOA)
• Set of common SOA principles :
– Loose coupling: Services must be designed to interact on a loosely
coupled basis
– Reusability: Logic that can potentially be reused is designed as a
separate service
– Contract: Services adhere to a communications contract that defines the
information exchange and any additional service description information
– Abstraction: Beyond what is described in the service contract, services
hide logic from the outside world
– Composability: Services may compose other services
– Autonomy: Services have control over the logic they encapsulate and
are not dependent upon other services to execute this governance
– Stateless: Services should not be required to manage state information
– Discoverability: Services can be found and assessed via available
discovery mechanisms
38
Service-Oriented Architectures (SOA)

(a) Traditional IT architecture for three business processes; (b) service-oriented


architecture that splits the processes into a number of reusable services 39
Distributed Database and DBMS
• Distributed Database
– A logically related collection of shared data (and description of
this data), physically distributed over a computer network

• Distributed DBMS
– The software system that permits the management of the
distributed database and makes the distribution transparent
to users
– The objective of transparency is to make the distributed
system appear like a centralized system
– This is sometimes referred to as the fundamental principle of
distributed DBMSs
40
Distributed DBMS

41
Characteristics of DDBMS
• A collection of logically related shared data
• Data split into a number of fragments
• Fragments may be replicated
• Fragments/replicas are allocated to sites
• Sites are linked by a communication network
• Data at each site is under control of a DBMS
• DBMS at each site can handle local applications
autonomously
• Each DBMS participates in at least one global
application
42
Distributed Processing

• A centralized database that can be accessed


over a computer network
• This centralized data can be accessed by
other users over the network

43
Distributed Processing

44
Data Warehousing
• A data warehouse is a system that pulls together data from many
different sources within an organization for reporting and
analysis
• A data warehouse is a central repository of information that can
be analyzed to make more informed decisions
• A data warehouse stores historical data about your business so
that you can analyze and extract insights from it

45
Data Warehousing
• Data Warehouse Features: The key features of a data warehouse are
discussed below:
• Subject Oriented − A data warehouse is subject oriented because it
provides information around a subject rather than the organization's
ongoing operations. These subjects can be product, customers, suppliers,
sales, revenue, etc.
• Integrated − A data warehouse is constructed by integrating data from
heterogeneous sources such as relational databases, flat files, etc. This
integration enhances the effective analysis of data.
• Time Variant − The data collected in a data warehouse is identified with a
particular time period. The data in a data warehouse provides information
from the historical point of view.
• Non-volatile − Non-volatile means the previous data is not erased when
new data is added to it. A data warehouse is kept separate from the
operational database and therefore frequent changes in operational database
is not reflected in the data warehouse. 46
Data Warehousing Architecture
End-user Access Tools
Warehouse Manager
Highly
Summarized
Operational Data
Data Source 1
Reporting, query,
Metadata application development
Load Query and EIS tools
Manager Lightly Manager
Summarized
Operational Data
Data Source 2

OLAP tools
Detailed Data

Operational Warehouse Manager


Data Source 3

Archive/Back Data Mining tools


up Data

Operational
Data Source 4 47
Cloud Computing
• The National Institute of Standards and Technology (NIST) provided a
definition.
• A model for enabling ubiquitous, convenient, on-demand network access
to a shared pool of configurable computing resources (e.g., networks,
servers, storage, applications, and services) that can be rapidly
provisioned and released with minimal management effort or service
provider interaction (NIST, 2011).
• The ‘Cloud’ itself is a virtualization of resources—networks, servers,
applications, data storage, and services—which the end-user has on-
demand access to.
• Virtualization is the creation of a virtual version of something,
such as a server, operating system, storage device, or network
resource.
48
Cloud Computing – Key Characteristics

• On-demand self-service
– Consumers can obtain, configure and deploy
cloud services without help from provider.

• Broad network access


– Accessible from anywhere, from any
standardized platform (e.g. desktop computers,
laptops, mobile devices).

49
Cloud Computing – Key Characteristics

• Resource pooling
– Provider’s computing resources are pooled
to serve multiple consumers, with different
physical and virtual resources dynamically
assigned and reassigned according to
consumer demand. Examples of resources
include storage, processing, memory, and
network bandwidth.

50
Cloud Computing – Key Characteristics

• Rapid elasticity
– Provider’s capacity caters for customer’s spikes
in demand and reduces risk of outages and
service interruptions. Capacity can be
automated to scale rapidly based on demand.
• Measured service
– Provider uses a metering capability to measure
usage of service (e.g. storage, processing,
bandwidth, and active user accounts).

51
Cloud Computing – Service Models

• Software as a Service (SaaS):


– Software and data hosted on cloud. Accessed
through using thin client interface (e.g. web
browser). Consumer may be offered limited
user specific application configuration settings.
– Examples include Salesforce.com sales
management applications, NetSuite’s
integrated business management software,
Google’s Gmail and Cornerstone OnDemand.

52
Cloud Computing – Service Models

• Platform as a Service (PaaS)


– Allows creation of web applications without
buying/maintaining the software and underlying
infrastructure. Provider manages the
infrastructure including network, servers, OS and
storage, while customer controls deployment of
applications and possibly configuration.
– Examples include Salesforce.com’s Force.com,
Google’s App Engine, and Microsoft’s Azure.

53
Cloud Computing – Service Models

• Infrastructure as a Service (IaaS)


– Provider’s offer servers, storage, network and
operating systems – typically a platform
virtualization environment – to consumers as
an on-demand service, in a single bundle and
billed according to usage.
– A popular use of IaaS is in hosting websites.
Examples Amazon’s Elastic Compute Cloud
(EC2), Rackspace and GoGrid.

54
Cloud Computing – Comparison of Services
Models

55
Benefits of Cloud Computing
• Cost-Reduction: Avoid up-front capital expenditure.
• Scalability/Agility: Organisations set up resources on an
as-needs basis.
• Improved Security: Providers can devote expertise &
resources to security; not affordable by customer.
• Improved Reliability: Providers can devote expertise &
resources on reliability of systems; not affordable by
customer.
• Access to new technologies: Through use of provider’s
systems, customers may access latest technology.
56
Benefits of Cloud Computing
• Faster development: Provider’s platforms can provide
many of the core services to accelerate development
cycle.
• Large scale prototyping/load testing: Providers have
the resources to enable this.
• More flexible working practices: Staff can access files
using mobile devices.
• Increased competitiveness: Allows organizations to
focus on their core competencies rather than their IT
infrastructures.
57
Risks of Cloud Computing
• Network Dependency: Power outages, bandwidth issues and
service interruptions.
• System Dependency: Customer’s dependency on availability and
reliability of provider’s systems.
• Cloud Provider Dependency: Provider could became insolvent or
acquired by competitor, resulting in the service suddenly
terminating.
• Lack of control: Customers unable to deploy technical or
organisational measures to safeguard the data. May result in
reduced availability, integrity, confidentiality, intervenability and
isolation.
• Lack of information on processing transparency
58
Cloud-based database solutions
• As a type of Software as a Service (SaaS),
cloud-based database solutions fall into
two basic categories:
– Database as a Service (DBaaS) and
– Data as a Service (DaaS)

• Key difference between the two options


is mainly how the data is managed.

59
Cloud-based database solutions
• DBaaS

–Offers full database functionality to application developers.


–Provides a management layer that provides continuous
monitoring and configuring of the database to optimized
scaling, high availability, multi-tenancy (that is, serving multiple
client organizations), and effective resource allocation in the
cloud, thereby sparing the developer from ongoing database
administration tasks.

60
Cloud-based database solutions
• DaaS:
– Services enables data definition in the cloud
and subsequently querying.
– Does not implement typical DBMS interfaces
(e.g. SQL) but instead data is accessed via
common APIs.
– Enables organization with valuable data to offer
access to others. Examples Urban Mapping
(geography data service), Xignite (financial data
service) and Hoovers (business data service.)
61
Cloud-based database solutions
• Multi-tenant cloud database-shared server,
separate database server process architecture.

62
Cloud-based database solutions
• Multi-tenant cloud database-shared DBMS server,
separate databases.

63
Cloud-based database solutions
• Multi-tenant cloud database–shared database,
separate schema architecture.

64
Components of a DBMS
• A DBMS is partitioned into several software
components (or modules), each of which is assigned a
specific operation.
• As stated previously, some of the functions of the
DBMS are supported by the underlying operating
system.
• The DBMS interfaces with other software
components, such as user queries and access
methods (file management techniques for storing
and retrieving data records).
65
Components of a DBMS

66
Components of a DBMS

• Query processor is a major DBMS component that


transforms queries into a series of low-level
instructions directed to the database manager.
• Database manager (DM) interfaces with user-
submitted application programs and queries. The
DM examines the external and conceptual schemas
to determine what conceptual records are required
to satisfy the request. The DM then places a call to
the file manager to perform the request.
67
Components of a DBMS

• File manager manipulates the underlying storage files


and manages the allocation of storage space on disk.
It establishes and maintains the list of structures and
indexes defined in the internal schema.
• DML preprocessor converts DML statements
embedded in an application program into standard
function calls in the host language. The DML
preprocessor must interact with the query processor
to generate the appropriate code.

68
Components of a DBMS

• DDL compiler converts DDL statements into a


set of tables containing metadata. These
tables are then stored in the system catalog
while control information is stored in data
file headers.
• Catalog manager manages access to and
maintains the system catalog. The system
catalog is accessed by most DBMS
components.
69
Components of Database Manager (DM)

70
Components of the Database Manager

• Authorization control to confirm whether the user has


the necessary permission to carry out the required
operation.
• Command processor on confirmation of user authority,
control is passed to the command processor.
• Integrity checker ensures that requested operation
satisfies all necessary integrity constraints (e.g. key
constraints) for an operation that changes the
database.

71
Components of the Database Manager

• Query optimizer determines an optimal strategy


for the query execution.
• Transaction manager performs the required
processing of operations that it receives from
transactions.
• Scheduler ensures that concurrent operations on
the database proceed without conflicting with
one another. It controls the relative order in
which transaction operations are executed.
72
Components of the Database Manager

• Recovery manager ensures that the database remains


in a consistent state in the presence of failures. It is
responsible for transaction commit and abort.
• Buffer manager responsible for the transfer of data
between main memory and secondary storage, such
as disk and tape.
• The recovery manager and the buffer manager also
known as (aka) the data manager. The buffer
manager aka the cache manager.
73
Assignment # 3
1. Compare the two-tier client–server architecture for
traditional DBMSs with the three-tier client–server
architecture. Why is the three-tier client-server
architecture more appropriate for the Web?
2. What technologies and standards are used to develop
Web services and how do they relate to each other?
3. What are the five essential characteristics of cloud
computing?
4. What is the difference between Data as a service
(DaaS) and Database as a service (DBaaS)?

74

You might also like