Vous êtes sur la page 1sur 8

RDBMS Concepts J.

SRINIVASA REDDY

The Client/Server Database


Technically, the term Client/Server Refers to any two cooperating processes. The
client process requests a service from the server process, which in turn handles
the request for the client. The Client process and the server process may be on
different computers or on the same computer: It's the cooperation between the
processes that is significant, not the physical Location.

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

Desktop databases move the database file to the client,


and the work is performed with in the client.

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

The client/server database model offers several benefits over the


desktop database model:

• 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.

• Performance is improved and better balanced among workstations


because half of the workload, the database processing, is being handled
by the server, and workstations are only handling the user interface half.

• Network traffic is greatly reduced. Compared to a desktop database's


rush-hour traffic, Client/server traffic is like a single motorcyclist carrying a
slip of paper with all 10 lanes to him self. This is no exaggeration!
Upgrading a heavily used desktop database to a well-designed
client/server database will reduce database related network traffic by more
the 95 percent.

Client/Server Roles

The Database Server is responsible for the following:


• Processing data modification and retrieval requests.
• Performing data-intensive processing.
• Enforcing all database rules and constraints.
• Enforcing data Security.

The Database Client Process Should be responsible for:


• Presenting the data to the user in an easily recognizable, inviting, and
useful format.
• Providing an interface to the various tools, data, and reports
• Submitting requests to the server.

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.

In a situation in which more than one server may be available, a common


connection object makes it easier to switch the users from Server A to Server B if
Server A should go down. The connection object become a single point that
could automatically detect the situation and switch to Server B.

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

Advantages of centralized databases

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.

2. The server might be a custom-built machine that is tailored to the DBMS


function, and might thus provide better DBMS performance. Similarly, the
front-ends may also be tailored to the needs of the end users and thus be
able provide better interface, high availability. Faster responses, and
overall ease of use to the user.

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.

Disadvantages of centralized databases

1. Since all the data is stored at one place, any discrepancy may result in
database corruption.

2. The server must be able to grow in power and capacity to accommodate


more clients. Otherwise it will become a bottleneck.

3. Centralized computing is more complex because proper processing


requires close communication between clients and server, hence,
specialized and expensive tools are necessary.

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

Big corporations with widespread operations can benefit from distributed


databases. In such organizations, computer processing is also distributed,
with processing done locally at each location. A distributed database is
fragmented into smaller data sets. Normally,the database is divided into
data sets based on usage. If a fragment contains data that is most
relevant to one location, that data set is kept at that location. Each
fragment of data at every location may be managed with the same type of
database management system. For example, at every location Oracle
DBMS may be used. In such case, the distributed database is referred to
as a homogenous database. On the other hand, if the data fragments are
managed at different locations with different DBMSs, then the distributed
database is referred at as a collection of heterogeneous database system.

Fragment of Fragment of
Main Database Main Database

Fragment of
Fragment of
Main Database
Main Database

Fragment of
Main Database

Note: A distributed database is not the same as a decentralized


database in which the computers are not connected by a
network, so users cannot share data.

7 -
RDBMS Concepts J.SRINIVASA REDDY

Advantages of distributed databases:

1. When a centralized database fails, the database is unavailable to all


users. A distributed system will continue to function at some reduced level
even when a component fails.

2. Certain operations can be processed at one site in the network, thus,


resulting in speed in processing and no communications overhead. The
local organization is then fully responsible for the accuracy and
safekeeping of the database.

3. Usually, requests for data by users at a particular site can be satisfied by


data stored at that site. This speeds up query processing.

4. With a distributed system, data can be located closer to their point of use.
This, like a centralized system, can reduce communication costs.

5. Separate systems may be used to store data and/or process certain


applications. These systems should have the capability to pass
transactions among themselves. Data not available on one system may be
obtained on another system.

6. It is easier and more economical to add a local computer and its


associated data to the distributed network than to expand a large central
computer.

Disadvantages of distributed databases:

1. Complex software (the DBMS) is required for a distributed database


environment.

2. The various sites must exchange messages and perform additional


calculations to ensure proper coordination among the sites.

3. A by-product of the increased complexity and need for coordination is the


additional exposure to improper updating and other problems of data
integrity.

4. If the data are not distributed properly according to their usage, or if


queries are not formulated correctly, response to requests for data can be
extremely slow.

8 -

Vous aimerez peut-être aussi