Data Base Assignment 1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

**Answer the Following Questions**

Q#1: What is meant by Term ‘Client-Server Architecture’ and what are the advantages of this
approach? Compare the Client-Server Architecture with two other Architectures.
Ans: Client–Server Architecture refers to the way in which software components interact.
There is a client process that requires some resource, and a server that provides the resource.
Data-intensive business applications consist of four major components: the database, the
transaction logic, the business and data application logic, and the user interface, In the two-tier
model, the client handles the user interface and business processing logic (tier 1) and the server
handles the database functionality(tier 2). The client (tier 1) is primarily responsible for the
presentation of data to the user, and the server (tier 2) is primarily responsible for supplying
data services to the client.

Advantages of this type of Architecture:


 It enables wider access to existing databases.
 Hardware costs may be reduced: It is only the server that requires storage and processing
 power sufficient to store and manage the database.
 Increased consistency
 It maps on to open systems architecture quite naturally.
 The common architectures that are used to implement multi-user database management
 systems: teleprocessing, file-server, and client-server.

Teleprocessing:
Here, there is one computer with a single central processing unit (CPU) and a number of
terminals. All processing is performed within the boundaries of the same physical computer.
User terminals are typically “dumb” ones, incapable of functioning on their own, and cabled to
the central computer. Unfortunately, this architecture placed a tremendous burden on the
central computer, which had to not only run the application programs and the DBMS, but also
carry out a significant amount of work on behalf of the terminals

File-Server Architecture:
A file server (or fileserver) is a computer attached to a network that has the primary purpose
of providing a location for shared disk access, i.e. shared storage of computer files such as
documents, sound files, photographs, movies, images, databases, etc., that can be accessed by
the workstations that are attached to the same computer network
The file-server architecture has three main disadvantages:
1. There is a large amount of network traffic.
2. A full copy of the DBMS is required on each workstation.
3. Concurrency, recovery, and integrity control are more complex, because there can be
multiple DBMSs accessing the same files. To overcome the disadvantages of the first two
approaches and accommodate an increasingly decentralized business environment, the
client–server architecture was developed.

Compare the Client-Server Architecture with two other Architectures:


Client–server architecture refers to the way in which software components interact. There is a
client process that requires some resource, and a server that provides the resource. In the two-
tier model, the client handles the user interface and business processing logic and the server
handles the database functionality. In the Web environment, the traditional two-tier model has
been replaced by a three-tier model, consisting of a user interface layer (the client), a business
logic and data processing layer (the application server), and a DBMS (the database server),
distributed over different machines. As, applications became more complex and potentially
could be deployed to hundreds or thousands of end-users, the client side of this architecture
gave rise to two problems:

 A ‘fat’ client, requiring considerable resources on the client’s computer to run effectively
(resources include disk space, RAM, and CPU power).

 A significant client-side administration overhead.


A new variation of the traditional two-tier client-server model appeared to solve these
problems called the three-tier client-server architecture. This new architecture proposed three
layers, each potentially running on a different platform:
1. The user interface layer, which runs on the end-user’s computer (the client).
2. The business logic and data processing layer. This middle tier runs on a server and is often
called the application server. One application server is designed to serve multiple clients.
3. A DBMS, which stores the data required by the middle tier. This tier may run on a separate
server called the database server.

The three-tier design has many advantages over the traditional two-tier design,
such as:
 A ‘thin’ client, which requires less expensive hardware.
 Added modularity, which makes it easier to modify or replace one tier without affecting the
other tiers.
 Easier load balancing, again as a result of separating the core business logic from the
database functions. For example, a Transaction Processing Monitor (TPM) can be used to
reduce the number of connections to the database server. (A TPM is a program that
controls data transfer between clients and servers in order to provide a consistent environment for
Online Transaction Processing (OLTP).)

Conclusion:
An additional advantage is that the three-tier architecture maps quite naturally to the Web
environment, with a Web browser acting as the ‘thin’ client, and a Web server acting as the
application server.
Q#2: Write A Small Program (Using Pseudocode If Necessary) That Allows Entry and Display of
Client Details Including A Client Number, Name, Address, Telephone Number, Preferred
Number of Rooms, And Maximum Rent. The Details Should Be Stored in A File. Enter A Few
Records and Displays the Details. Now Repeat This Process but Rather Than Writing A Special
Program, Use Any DBMS That You Have Access To. What Can You Conclude from These Two
Approaches.?
Ans: The program can be written in any appropriate programming language, such as Pascal,
FORTRAN, C, C++. It should adhere to basic software engineering principles including being well-
structured, modular, and suitably commented. It is important to appreciate the process
involved even in developing a small program such as this. The DBMS facilities to structure,
store, and retrieve data are used to the same effect. The differences in the approaches, such as
the effort involved, potential for extension, ability to share the data should be noted.  We can
take example of program in C++ language for writing client details, is generally includes more
number of steps and strings to display any part and even much more programming 

In the above given question, we are asked about writing an pseudo code that contains the
client information & his complete database record in a program for this process we follow the
different steps that are given below:
First of all, we need to create a database for the client management system in which it asks
from user its details like it may ask for client number its name ,address, contact no, numbers of
rooms required and ask about rent this data should be stored in a file from where we quickly
access the data. To design such type of database system first of all we will gather information
about the client management system and think about how these kinds of system works and
what are their rolls.
We will take client name, address in char (Char name[50]; Char address[50]) client telephone
number will be taken in integers value (int telephone Number) ; Number of rooms (int preferred
number of rooms;) and rent of room it could be in the form of points that’s why we will take It in data
type float ( float maximum rent;).after inserting data in its required datatype now its time for the
execution of program first the program ask about the user details like name contact as it has been
discussed already. After taking details it gives us output or display the result .but if we want to take
multiple user data then we have to implement For Loop in our program so it can take or store data o
multiple clients visit us and store the data on our data base system. In this way our whole Program
works

**** The End ****

You might also like