Structure and work of the RDB - Databases

Composition and operation of the RDB

The RDB scheme can be represented in the form shown in Fig. 10.2. It distinguishes the user, global (conceptual), fragmented (logical), and distributed (local) data representation layers (Figure 10.3) that define the network DBMS [11].

The general set (table system) of the data stored in the RDB is shown in Table. 10.1. This is a global level, which is determined by the same design methods as the conceptual model of a centralized database.

RDB Schema

Fig. 10.2. RDB scheme

Levels of data representation in RDB

Fig. 10.3. Levels of data representation in the RDB

Table 10.1

Data in the RDB (global level)

a ) Employee





























b ) Plant




St. Petersburg





in ) Raw
















In Table. 10.1. Fragments of the database are highlighted in different fonts.

Not all global data is available to a specific user. The most complete data (user, external level) is available in node 1 of the parent enterprise. In the nodes (sections) 2, 3 the data is less complete. So, in node 3 they have the form shown in Table. 10.2.

Table 10.2

Custom Level in EDIT

a ) Employee













b ) Plant




St. Petersburg





in ) Raw







The user level consists of fragments (for example, lines 1, 2, 3 Table Factory Table 10.1) of the global level, which constitute a fragmented, logical level.

Select horizontal and vertical fragmentation (dismemberment). Horizontal fragmentation is associated with the division of data into nodes. Horizontal fragments of ns overlap. Vertical fragmentation is associated with grouping data by task.

Fragmentation most often does not involve duplicating information in nodes. At the same time, when allocating fragments to nodes ( localizations ) of a distributed level in nodes, it is allowed to have copies of one or another part of the RDB. So, for example, localization for an example in tab. 10.1 can have the form shown in Table. 10.3.

Table 10.3

Data localization

Table name

Distribution of fragments by nodes



1. 2

1. s


1, 2, 3

I, 2, 3

1, 2, 3

Raw materials




Obviously, for the Plant table, duplication is performed, and for the table Raw - dismemberment.

After the data is placed, each node has a local, node view (local logical model). The physical implementation of the (logical) fragment is called the stored fragment.

RDB Operation Scheme

Fig. 10.4. RDB operation scheme

In other words, the RDB can be represented in the form shown in Fig. 10.3.

Network in the RDB form network operating systems (for example, Windows NT, Novell NetWare). As the database, originally intended for use on the network, it should be called BTrieve, Oracle, InterBase, Sybase, Informix.

Due to the data distribution, the data dictionary (reference book) of the RDB, which unlike the dictionary of a centralized database, has a distributed, multilevel structure becomes especially important.

In general, a network, common external, general conceptual, local external, local conceptual and internal components of the RDB dictionary can be distinguished.

Naturally, RDB administrators and local databases, whose working tools are the listed dictionaries, are necessary for working in the RDB.

The diagram of the RDB is shown in Fig.


The user's request, determined by the application, enters the distributed database management system (RDBMS), through the network and local operating systems gets into the local DBMS. If the query is associated with local data, the DBMS will call the data from the local database that the user receives. If a piece of data for running the application is in another local database, the local DBMS additionally through the local and network operating systems performs a Remote Procedure Call (PRC), after which the data is transferred to the user.

Four storage strategies are possible: centralized (often provided by the client-server architecture), fragmentation (fragmentation), duplication, mixed.

Comparative characteristics of storage strategies are given in Table. 10.4. On its basis, the simplest algorithm for choosing the strategy shown in Fig. 10.5.

Table 10.4

Storage strategies


The essence of the strategy



Centralization (including client-server technology)

Single copy in one node

Simplicity of structure

The processing speed is limited to one node



Low Reliability

Long-term memory determines the amount of the database



Single copy, dismemberment by nodes (a complete copy of the database is not allowed)

The volume of the database is determined by the network memory

Reducing the cost of an RDB The response time for parallel processing decreases

Low sensitivity to bottlenecks

Increased reliability with high data localization

Query can be on all nodes

Access is worse than with centralization



the long-term memory is limited in comparison with the volume of the database;

the efficiency of functioning with a high degree of localization


In each local database, a full copy

Higher reliability, access and efficiency of sampling, ease of recovery.

Local asynchronous processing in nodes

Getting quick answers

Database capacity is limited to long-term memory The need for synchronization of many copies The need for additional memory

Weak implementation of parallel processing Application recommendations: the reliability factor prevails;

The database is small; update rate is low;




Multiple copies of the stored logical fragment in each node

Any degree of reliability Greater availability

Less data transfers Parallel processing

You need to store dictionaries

Increase in the cost of reconciling data

Different frequency of the node's access to different parts of the database

Loss of reliability due to data partitioning

Small free long-term memory due to duplication

Note that the regular network has the equality of computers, which can cause additional complications in terms of access to data in update procedures and requests.

Storage Strategy Selection Algorithm

Fig. 10.5. Algorithm for choosing a storage strategy:

A - the query is local

In this connection, the client-server architecture is often used (Figure 10.6) - the structure of the local network in which distributed management of the server and workstations (clients) is applied to maximize the effective use of processing power.

In this structure, one of the computers with the largest amount of memory and the highest performance becomes a priority, called the server. The server most often stores only the data requested by the clients.

To clients do not have such stringent requirements for memory and speed. They are dictionaries and applications, serving as a kind of filters for these servers. In this regard, the exchange of information in the architecture (Figure 10.6) is actually minimized.

The work in the client-server architecture can also be supported using the Open DataBase Connectivity (ODBC) scheme, as shown in Fig. 10.7. In this case, the network is formed by connecting the servers. This connection is provided either by means of a DBMS (SQL Server) or by transaction monitors (TUXEDO).

Client-Server Architecture

Fig. 10.6. Client-Server Architecture

Let's discuss in more detail the implementation of the RDB - the client-server architecture.

ODBC in client-server architecture

Fig. 10.7. ODBC in the client-server architecture

Together with the term client-server three concepts are used.

1. Architecture: it's about the concept of constructing an RDB variant.

2. Technology: talk about the sequence of actions in the RDB.

3. System: considers the totality of elements and their interaction.

The client-server architecture was mentioned earlier.

Client-server technology allows you to increase productivity:

• the total time for executing queries due to a powerful server is reduced;

• The share decreases and the efficiency of the CPU usage of the CPU (for calculations) is increased;

• the amount of client's use of the its computer;

• Network traffic is reduced.

The following requirements are imposed on such large-scale systems: I) flexibility of the structure; 2) reliability; 3) data availability; 4) ease of maintenance of the system; 5) scalability of applications; 6) portability of applications (on different platforms); 7) multitasking (the ability to run many applications).

Note that the client-server architecture was preceded by the file-server architecture, in which the following options are possible.

1. Client computers have a copy of the database. Work on this option has the following difficulties: synchronization of data from different copies at the end of the database; high traffic (data flows between the server and clients, because the content of the entire database is transmitted in any case).

2. In the Access DBMS, which was originally created as a local database, a mode for dividing the database is provided. The tables remain on the server (back-end), and the remaining objects (requests, reports) are transferred to the clients (front-end). In this case, there is still a lot of traffic, so when using file servers, the number of connected clients - with their reliable operation - up to four.

At the same time, it required the connection of tens and even hundreds of customers [1-3]. This was achieved in the architecture (mode, technology) of the client-server. In this mode, traffic is drastically reduced, as only those data that correspond to customer requests are transmitted over the network. [2]

To do this, I had to build a DBMS, originally designed to work on the network. Microsoft [27-29] was forced - in addition to the Access database, which was used with the ODBC application only for client purposes - to offer Microsoft SQL Server as its server. This structure turned out to be heavy and inconvenient, since the developer needed to know already two DBMS.

Of the other proposals, the Delphi software [30-36] was very successful, within which DBase, Paradox, and, with a separate installation, InterBase (client-server mode) can be used. In addition, the InterBase DBMS is supported, along with the SQL programming language, by the powerful, understandable, simple and widespread Pascal programming language [11], built using the object-oriented approach [33].

The latter circumstance makes it easy to build object-relational databases (see Chapter 9). A high degree of automation of programming makes it possible to dramatically simplify and reduce the complexity of procedures for creating the user interface, and especially the application algorithm.

In the client-server system, you can select the following components: server, client, interface between client and server, administrator.

Server manages a common resource for multiple clients. It performs the following tasks:

• Manages the shared database;

• Accesses and protects data, restores it;

• Ensures data integrity.

The same requirements apply to the database on the server, as well as to the centralized multi-user database.

It should be noted that the results of client requests are placed in the working area of ​​server memory, which in a number of DBMS (for example, Oracle) is called the "table area". Since it does not take up much space, it is advisable for each user-user to create its own table space. In this case, the source tables become unavailable for the user, and the backup (copying) of the client application database is simplified.

The client stores its applications on the computer, which is used to request data on the server. The client solves the following tasks:

• provides an interface to the user;

• Manages application logic;

• Verifies the validity of the data;

• Performs a request and receives data from the server.

The means of transferring data between the client and the server is a network (coaxial cable, twisted pair) with a network (network operating system - SOS) and communication software.

Windows NT, Novell NetWare can be used as a SOS. Communication software allows computers to interact in the language of special programs - communication protocols.

In general, such an interaction is carried out using a seven-level ISO scheme with the appropriate protocols. For local networks, the scheme is simplified. The protocol for Windows NT is the Transmission Control Program/Internet Program (TCP/IP), for NetWare - Sequenced Packet eXchange/Intemet Packed eXchaned (SPX/IPX).

The variety of network facilities makes it necessary to create a standard client-server middleware on the server and clients. They talk about the application programming interface (API). These include Open DataBase Connectivity (ODBC) and the Integrated Database Application Programming Interface (IDAPI) used in Delphi and InterBase.

The interaction between clients and the server can be represented as follows:

When a user accesses an application, the client computer asks the user for a name and password. After that - with the correct answer - the application can be launched by the client. The application allows you to connect to a server that is informed of the user's name and password.

If the connection is made, a server running two types of processes starts to work: the front partition and the background processes.

The front-end processes directly process requests, the background component is associated with the management of the processing process.

The server operation may be of this order.

1. After receipt of the request, the dispatcher puts it in the queue according to the scheme "first-come-first-served".

2. The front-end process selects the oldest request and begins its processing. After completion, the results are placed in the queue for transmission to the client.

3. The dispatcher sends the results from the queue to the corresponding client.

When processing a request, background processes perform other important operations, the main ones of which are as follows:

• write data from the database to the intermediate (buffer) memory of the working area (when reading) and back (when updating);

• write to the transaction log;

• archiving (copying) of transaction groups;

• Abort transactions;

• periodic recording of control points on the disk to ensure data recovery in the RDB after a hardware failure.

Administrator The RDB (ARBD) must solve the following problems [39].

1. RDB planning and memory allocation.

2. Configuring your network.

3. Creating an RDB.

4. Working with application developers.

5. Create new users and manage permissions.

6. Regular backup of the database and execution of operations for its recovery.

7. Controlling access to the database using OS and SOS, security and access.

In large systems, an ARDB can consist of a number of individuals responsible, for example, for OS, network, archiving, protection.

Thus, the client-server system is unique: on the one hand, it can be considered a kind of centralized multi-user database, on the other hand, it is a special case of the RDB.

In this regard, there is specificity in the design process. It still begins with the creation of the application, then the interface and the database. However, due to the specifics of the system, the stages of fragmentation and placement are absent and have their own peculiarities.

The main limitation for the operation of such a system is minimal traffic. Therefore, in the development of the application, in addition to the usual tasks (understanding the purpose of the application, the processing logic, the type of interface), special attention should be paid to the development of the DLL script and the distribution of functions between the clients and the server.

The use of CASE tools to create a scenario significantly reduces the complexity of the design work. Otherwise, this procedure is performed manually using the SQL language commands.

The most important task is the distribution of functions. By the very essence of the technology, the database is located on the server, and the applications on the client computers. However, with straightforward integrity procedures and requests on the network, you may experience voluminous network traffic.

To reduce it, you can use the following guidelines:

1. Ensuring integrity for all applications is better centralized and implemented on the server. This will not only reduce traffic, but also rational use of RDBMS, improving the management of integrity (referential, constraints, triggers) of data.

2. It is advisable to use stored procedures on the server, the aggregate of which can be encapsulated as a package (module). As a result, the traffic will decrease: the client will only send the procedure call and its parameters, and the server the results of the procedure.

3. In some cases, customers should receive database notifications (for example, the warehouse clerk - about the lowest level of inventory at which to execute a new order). If the notification is made at the request of the client, traffic is increased. It is simpler to place this (stored) procedure on the server, which will automatically notify the client about the occurrence of the event. At the same time, the client, if necessary, can receive information using simple procedure calls.

In client-server mode, two types of structure are distinguished: one-level, which was discussed so far, and a multi-level structure (Figure 10.8).

If you use the thick client (a single-level structure), client applications are located directly on the users' machines, or partially on the server as a system of stored procedures. The complexity of the client side sometimes requires it

One-level -

Fig. 10.8. One-level - thick client (s) and multi-level - thin client ( b ) of the client-server structure

administration. Using a system of stored procedures significantly reduces the load on the network. If you use the thin client (multi-level structure) user applications are located and run on a separate powerful server (an application server that can be on the same computer as the database server), which significantly reduces the requirements for user machines.

So, in the InterBase DBMS in a single-level structure, each client has a Borland Database Engine (BDE - the Delphi kernel) of 8 MB. In a multi-level structure, the BDE utility is only available in the application server, and the amount of memory occupied by the client is reduced to 212 KB. This result is achieved due to the complexity of the structure.

thematic pictures

Also We Can Offer!

Other services that we offer

If you don’t see the necessary subject, paper type, or topic in our list of available services and examples, don’t worry! We have a number of other academic disciplines to suit the needs of anyone who visits this website looking for help.

How to ...

We made your life easier with putting together a big number of articles and guidelines on how to plan and write different types of assignments (Essay, Research Paper, Dissertation etc)