The Client/Server Database: RDBMS Concepts J.Srinivasa Reddy
The Client/Server Database: RDBMS Concepts J.Srinivasa Reddy
The Client/Server Database: RDBMS Concepts J.Srinivasa Reddy
SRINIVASA REDDY
The term client/server applies to many aspects of computing. File servers, print
servers, and Internet service providers (ISPs) are all client/server models. File
servers provide files, print servers handle print requests, and ISPs handle
requests for Internet service. In the area of client/server databases, a database
server process handles database requests from the database client process.
Desktop databases
Desktop databases perform all the database tasks at the client. while a multi-user
desktop database may use client/server file processing, it doesn't qualify as
client/server database processing.
1. Database work
Performed at
Desktop.
2. Desktop opens
file from server
1 -
RDBMS Concepts J.SRINIVASA REDDY
Client/Server Databases
In a client/server database, the database Client prepares a SQL request that is
just a small text message, and sends it to the database server, which in turn
reads and processes the request inside the server, the security is checked, the
indexes are searched, the data is retrieved or manipulated, any server side code
is executed, and the final results are sent back to the client.
1. SQL Request
to server
3. Record set
returned
by Server
2. DB Work
in server
Client / Server databases perform the work within the server process.
All the database work is performed within the database server. If the client
requests a dataset, the dataset is prepared within the server and copy of the data
is sent to the client. The actual data and indexes never leave the server. When
the client requests an insert, update, or delete operation, the server receives the
SQL request and processes the request internally.
2 -
RDBMS Concepts J.SRINIVASA REDDY
• Reliability is improved because the data is not spread across the network
and several Applications. Only one process handles the data.
• Data integrity constraints and business rules can be enforced at the sever
level, resulting in a more through implementation of the rules.
• Security is improved because the database keeps the data within a single
server.
Client/Server Roles
3 -
RDBMS Concepts J.SRINIVASA REDDY
N-Tire Design
Often, in a Client/Server application, more processes are involved besides the
database client and the database-server process. Middle tires are often
employed to handle connection handling, connection pooling, and business logic.
Middle Tire
Middle Tier
Object
N-Tire middle layers can manage user connections between the client process and the database
server.
A middle tier that handles connections is useful because multiple users can take
advantage of a few constantly open connections to the database server. This
type of connection, however, affects the way the database server can
authenticate individual users. The database-security plan will have to take this
into account.
Some developers argue that it's a good idea to place business rules in a middle-
tire object because that makes modifying the business rules easier. I disagree.
Business rules and database constraints should be enforced at the database
server level so they can never be bypassed by any user application or process.
Coding the business rules at the server level gives the code faster access to
database lookups and improves performance. The only downsides to coding the
business rules within the server are that the programmer must learn server-side
programming. And that the database application is more difficult to port to other
database products.
4 -
RDBMS Concepts J.SRINIVASA REDDY
TYPES OF DATABASES
1. Centralized Database
In centralized databases, application process shared between numerous
clients and a server. The client workstations are responsible for managing
the user interface, and the database server is responsible for database
storage and access. In this system, all database recovery, security, and
concurrent access management are centralized at the database server.
The server executes all data qualification statements and only data that
satisfy the criteria are sent to client stations.
Centralized
Database
The central DBMS functions are called back-end functions; application programs
on the client PCs are called front-end programs.
5 -
RDBMS Concepts J.SRINIVASA REDDY
1. Since multiple processors are being applied to the overall task, the back-
end (database) and front-end (Application) processing are being done in
parallel. Thus, response time and throughput are improved.
3. Several different client machines might be able to access the same server
machine. Thus, a single database is shared across several different (and
possible widely different) front-end systems.
1. Since all the data is stored at one place, any discrepancy may result in
database corruption.
2. Distributed Database
A distributed database system consists of a collection of sites, connected
together by the use of some kind of communication network, each site is a
database system site in its own right and the sites have agreed to work
together. So that user at any site can access anywhere in the network as if
the data were all stored at the users local site. In other words each site
has its own local database, its own local users, its own local DBMS and
transaction management software, and its own local data communication
manager. In particular,a given user can perform operations on data at the
user’s own local site as if that site did not participate in the distributed
system at all. The distributed database system can thus be regarded as a
kind of partnership among the individual local DBMSs at the individual
local sites.
6 -
RDBMS Concepts J.SRINIVASA REDDY
Fragment of Fragment of
Main Database Main Database
Fragment of
Fragment of
Main Database
Main Database
Fragment of
Main Database
7 -
RDBMS Concepts J.SRINIVASA REDDY
4. With a distributed system, data can be located closer to their point of use.
This, like a centralized system, can reduce communication costs.
8 -