Professional Documents
Culture Documents
Database Architecture and The Web: Batch: F-18IT Subject: Database Systems
Database Architecture and The Web: Batch: F-18IT Subject: Database Systems
Database Architecture and The Web: Batch: F-18IT Subject: Database Systems
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.
Disadvantages include:
– Significant network traffic.
– Copy of DBMS on each workstation.
–
File-Server Architecture
•The processing is distributed
about the network (LAN)
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
(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.
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)
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
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)
• 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
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
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.
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
52
Cloud Computing – Service Models
53
Cloud Computing – Service Models
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)
59
Cloud-based database solutions
• DBaaS
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
68
Components of a DBMS
70
Components of the Database Manager
71
Components of the Database Manager
74