client server database in dbms
client-server database in DBMS
Client-Server Architecture
Client-server architecture is a network of computers. It consists of two types of computers known as clients and servers. The client computers process applications and server computers provide services to client computers such as database processing.
The client-server database system is based on a client-server architecture. In this computer database system, the server computer stores and processes a database in a computer system. The client computers use the database by sending requests to the server computer.
Client-Server Processing
In client-server processing, application programs perform the following tasks:
- Process the user interface
- Invoke application logic
- Enforce some business rules
- Calls the DBMS for database service. The call is normally given in SQL management.
- Process SQL statements.
- Enforce some business rules.
- Returns data or error messages to the computer application program.
- Provides reliability and security
Functions of client or server:
In a client-server database system, the application program is stored on client computers, and DBMS is placed on the server computer. Another software placed on the client is known as DBMS driver.
Functions of Clients computers:
The client's computer performs the following tasks.
- Manages the user interface
- Accepts data from the user
- processes application logic
- Enforces business rules
- Generates requests to the server
- Transmits request to the server
- Receives results from the server
- Presents the results to the user
Functions of a Server Computer:
The server computer performs the following tasks.
- Accepts the client's request
- Processes clients request
- Enforces rules
- Performs database integrity checks
- Provides concurrent access control
- Return the result to the client
- Perform recovery and security and security services
Advantages of Client-server System
The advantages are as following:
- Concurrent Access
- Better Performance
- Reduced Cost
- Better User Interface
Disadvantages:
In a client-server database system, there is a possibility of less control. Many users are accessing the server simultaneously or at the same time, it can result in wrong data in the database management system.
Reliability and Security in Client-Server System:
Client-server is a multi-user system in which many users can access the database at the same time. The system must ensure the security and reliability of the data in the database.
Concurrency Control:
Different types of problems may occur if the data is accessed simultaneously by different clients. Suppose two users are trying to update the value of a field at the same time in the concurrency control. The value of the field is 250 in it.
The final value updated in the field of concurrency is 300, which is wrong. The actual value in the field should be 400 in the server system, The above problem can be prevented in two ways:
- Pessimistic Locking
- Optimistic Locking
- Pessimistic Locking:
It is used with each transaction automatically. Whenever a transaction starts, the DBMS locks the database of the network. If any other users try to access the database at this time, it is now allowed. When the transaction is completed, the database is unlocked and the other client can access the database.
2. Optimistic Locking:
The optimistic locking mechanism works with the assumption that there will be no conflict. It allows transactions to proceed as if there were no concurrency problems. But before a transaction commits, a check is performed to determined whether the conflict has occurred or not. In case of a conflict data, The transaction of data is rolled back.
3. Recovery:
If any problem occurs and data is lost, the client-server system is responsible for recovering the data. For this purpose, the server computer keeps a log of change in the database.
4. Security:
The security in client-server is maintained in different ways. The system administrator allocates usernames and passwords to users and assigns specific rights to them to use websites. Different access levels and privileges are applied to tables and views. The user needs to login using a password for using the database.
Open Database Connectivity (ODBC):
Open Database Connectivity is a standard interface that is used to process different types of databases. ODBC is DBMS-independent and process databases developed in different database management systems. It means that an application that uses the ODBC interface can process Oracle database, Access database, or any other database without changing any problem code.
The basic purpose of ODBC is to allow a developer to develop a single application of a Database management system. The application can access different databases supported by different DBMS without changing the code and recompiling it.
ODBC was developed by a committee of industry experts from X/Open and SQL Access Group committees of the network system. It has been implemented and is part of Windows. It databases developed in different types of DBMS.
ODBC Architecture:
There are many components of the ODBC standard. The application program, driver manager, and DBMS drivers reside on the client's computer. The drivers send requests to data sources. The data source resides on the server computer. The data source consists of a database, its associated DBMS, operating system, and network platform. An ODBC data source can be a relational database, a file server or a spreadsheet, etc.
The application issues a request to create a connection with the data sources to perform different operations on the database. ODBC provides a standard means for each of these requests and defines a standard set of error codes and messages of this system.
ODBC identifies two types of drivers:
- Single-tier Driver:
- Multi-Tier Driver:
- Conformance levels:
There are two types of conformance levels:
- ODBC Conformance level
- SQL Conformance Level
ODBC Conformance level
Its level is related to the feature and functions of the available driver's application program interface (API). An API is a set of different functions that perform a particular task. The application can call an API to receive its services on a network.
SQL Conformance Level:
SQL conformance levels specify which SQL statements, expression, and data type drive can process. The application can call the driver to determine the SQL conformance level. If a higher SQL conformance level is not available, the application may use a lower level for obtaining the required data from the data source.
The translator is referred as to an ODBC Driver.


Comments
Post a Comment