db lecture
TRANSCRIPT
-
8/8/2019 DB Lecture
1/23
Database Application
Development
2nd December, 2010
-
8/8/2019 DB Lecture
2/23
Lecture Preview
Database Application Development
Service-oriented Architecture
Web-Services
-
8/8/2019 DB Lecture
3/23
A quick look (Client-Server
Architecture) Advancement in technology over the last
decade has brought new concepts andarchitectures in database applications.
No matter how we blend it up, the basicarchitecture remains same. Entity A needs aservice and asks for it where Entity B provides
it. Its mostly about location. i.e. what should be
at server and what should be at client?
-
8/8/2019 DB Lecture
4/23
Architecture optimization
We use the most suitable architecture to our
application. How to decide that?
Is it location? What?
It is the speed + response time with which
data can be moved from one location toanother.
-
8/8/2019 DB Lecture
5/23
Client/Server Architecture
Definition
To handle client queries the service provider
(Server) needs some kind of a managementsystem to look after concurrency, integrity,
security and other features.
In case of databases this system is DBMS
(Database Management System).
-
8/8/2019 DB Lecture
6/23
Client/Server Architecture
Various C/Ss can be distinguished on the basis
of distribution of Application Logic
Components across clients and servers.
These are,
Presentation Component
Processing Component
Storage Component
-
8/8/2019 DB Lecture
7/23
Application Partitioning
Its critical to the performance of the system
that how we place each of these components.
There are two, three and n-tier architectures,in each architecture,
the storage component always resides at server
The presentation component always resides at
client
-
8/8/2019 DB Lecture
8/23
Fat / Thin
If we place processing component on client
then it is a fat client.
If we place processing component on serverthen it is a thin client.
And, if we partition it on both server and
client then, it is a distributed client.
-
8/8/2019 DB Lecture
9/23
Fat / Thin
-
8/8/2019 DB Lecture
10/23
3/n-tier Architecture
Here some processing can be placed at client,but usually in a typical web environment aclient is only a thin client. (what do we use
here for presentation component?) What kind of a architecture is used in an
online banking system? and why ?
How do databases are manipulated on each
of these architecture?
-
8/8/2019 DB Lecture
11/23
Databases in 2-tier Architecture
In this architecture, a client workstation is
responsible for managing the user interface,
including presentation logic, data processing
logic, and a business rules logic.
A database server is responsible for database
storage, access and processing.
-
8/8/2019 DB Lecture
12/23
Implementation
Most 2-tier applications are written in
languages like VB, C# or Java.
These applications are connected to databasethrough special software called Database-
Oriented Middleware. (It is an abstraction).
The process of Middleware connecting an
application to a database consists of two
parts, (Middleware acts as a glue)
-
8/8/2019 DB Lecture
13/23
Implementation
-
8/8/2019 DB Lecture
14/23
Implementation
An API(application programming interface)
A database driver (to connect to a specific
database e.g. SQL Server or Oracle).
Most common APIs are ODBC(Open Database
Connectivity) and ADO.NET for the Microsoft
Platform. JDBC for Java.
-
8/8/2019 DB Lecture
15/23
Implementation
No matter which API or language is used, the
steps are as follows:
Identify and register a database driver.
Open a connection to a database.
Execute a query against the database.
Process the results of the query.
Repeat steps 3-4 as necessary.
Close the connection to the database.
-
8/8/2019 DB Lecture
16/23
A small example
Before going to circuit, lets get acquainted
with some important terms,
Connection
Command
SQL Data Adapter
SQL Data Set
SQL Data Table
-
8/8/2019 DB Lecture
17/23
A small example
We are going to develop a simple client and
service provider database.
We are going to use VB.NET and SQL
Server.
There are several methods for database
connectivity, lets take a look (first we will see aglimpse of SQL and SQL server then we will
look at a .NET application).
-
8/8/2019 DB Lecture
18/23
3-Tier Applications
In three tier there is an additional server
which can be used for different purposes, it
can be used as application server.
The most common type of application here is
a Web-based Application. Here the additional
server involved is a web-server.
It can be either on intranet, internet or both.
-
8/8/2019 DB Lecture
19/23
Web-Applications
-
8/8/2019 DB Lecture
20/23
Web Application Components
Database Server (Storage logic and DBMS)
Web Server (handles http client requests, e.g.
IIS or Apache) Application Server
Web browser
Simple example, a registration module
developed in ASP or PhP.
-
8/8/2019 DB Lecture
21/23
Databases in 3-tier Applications
Static Page Request
Dynamic Page Request
Web Server (IIS)
Application Server (ASP.NET)
Database Server
Database Server
D
r
i
v
e
r
-
8/8/2019 DB Lecture
22/23
Web Services
It is a new class of applications that improves the
communication ability of systems over the web.
A common web service protocol stack is,
UDDI (Publish, Find and use services)
WSDL (Service Descriptors )
SOAP (Service Interactions, )
XML (Data Format ) Internet (Communications)
-
8/8/2019 DB Lecture
23/23
Web Service
Lets, take a look.