Database Application Development: 2 December, 2010

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

Database Application

Development
2nd December, 2010
Lecture Preview
• Database Application Development
• Service-oriented Architecture
• Web-Services
A quick look (Client-Server Architecture)
• Advancement in technology over the last
decade has brought new concepts and
architectures in database applications.
• No matter how we blend it up, the basic
architecture remains same. Entity A needs a
service 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?
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 to
another.
Client/Server Architecture
• Definition
• To handle client queries the service provider
(Server) needs some kind of a management
system to look after concurrency, integrity,
security and other features.
• In case of databases this system is DBMS
(Database Management System).
Client/Server Architecture
• Various C/S’s can be distinguished on the basis
of distribution of “Application Logic
Components” across clients and servers.
• These are,
– Presentation Component
– Processing Component
– Storage Component
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
Fat / Thin
• If we place processing component on client
then it is a ‘fat’ client.
• If we place processing component on server
then it is a ‘thin’ client.
• And, if we partition it on both server and
client then, it is a ‘distributed’ client.
Fat / Thin
3/n-tier Architecture
• Here some processing can be placed at client,
but usually in a typical web environment a client
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?
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.
Implementation
• Most 2-tier applications are written in
languages like VB, C# or Java.
• These applications are connected to database
through 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)
Implementation
Implementation
– An API(application programming interface)
– A database driver (to connect to a specific
database e.g. SQL Server or Oracle).

• Most common API’s are ODBC(Open Database


Connectivity) and ADO.NET for the Microsoft
Platform. JDBC for Java.
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.
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
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 a
glimpse of SQL and SQL server then we will
look at a .NET application).
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.
Web-Applications
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.
Databases in 3-tier Applications
Web Server (IIS) Database Server
Static Page Request

Application Server (ASP.NET)

Dynamic Page Request


Driver

Database Server
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 <interfaces, how?>)
– SOAP (Service Interactions, <language independent>)
– XML (Data Format <standard>)
– Internet (Communications)
Web Service
• Lets, take a look.

You might also like