The basic difference between a server and a database is that server is a computer program that runs to provide services to other computer programs or devices. On the other hand, the database is an application that stores data in an organized form and can be retrieved by the user with the help of a query.
A server is a physical computer with large a large disk drive that has a server program running on it. The server program provides services to other computer programs or devices (clients). The figure below illustrates the client-server model.
The client-server model is widely used and it forms the basis of much of the network usage.
We use servers to provide services to the clients.
1. Share (send and receive) data to/from multiple clients.
2. Share resources among multiple clients.
3. Storing data
The main function of a server is to provide the requested services to its clients. We can easily explain the working of the server with the help of the client-server model.
The model includes two processes i.e. a client process and a server process. The client process runs on the client machine and the server process runs on the server machine.
Now whenever the client needs any service it asks the server process, by sending a message. When the server process receives this message, it performs the requested task. Or if the request is for some data its lookups for the requested data and sends a corresponding reply.
Well, you can take the above explanation as a basic working of a server. If we explore it further the server can be a physical server, a virtual server or just a server software.
1. Physical Server
It is a physical computer on which the server software runs.
2. Virtual Server
The virtual server is created on the physical machine. So, the virtual server has its own operating system and applications. To create a virtual server on a physical machine a software hypervisor is installed on the physical machine.
The hypervisor enables a physical machine to host several virtual servers by keeping the resources of one virtual server separate from the resources of another virtual server.
3. Server Software
Like any software the server software also requires a minimum of one resource to run i.e. operating system. The operating system provides the platform for server software to run. The operating system facilitates the server software to access the hardware resources.
The most common type of server that we come across is the web server that provides you web base services. But there are several other types of servers.
It is the one that provides all the web-based services requested by clients over the World Wide Web.
The email server manages to send and receiving of emails between the business clients.
The database server is capable of hosting multiple databases. It manages the accessibility of clients to the data over the network.
The print server coordinate between the printers connected to the clients in the network.
It serves as a multiplayer gaming experience for the players present at different locations of the world.
It is a server that acts as an intermediate between clients and the server to which the client has requested the service.
1. If too many clients send a request to the server at the same time it might lead to traffic congestion.
2. Any failure in the centralized server may lead to the failure of the entire network.
3. Installing and maintaining is server is a cost-effective process.
1. Centralized Database
It stores data in the centralized database system. The user can remotely access the centralized database system with the help of some application.
2. Distributed Database
Distributed database as the name suggests, here we store data on the different database systems of the company. However, these distributed systems are connected to each other with the help of a communication link. The distributed database is further classified into two types:
a) Homogenous DDB
The data in homogenous DDB is distributed among various servers. But all these servers run the same DBMS software.
b) Heterogenous DDB
The data in heterogenous DDB is distributed among different servers that run with different DBMS software.
3. NoSQL Database
NoSQL is ‘not only SQL’ database. It has a non-tabular structure and it stores data differently from the relational database. NoSQL databases stores data in various ways, it totally depends on the data model used.
The NoSQL database can store data in the form of documents, graphs, key-value and wide-column.
4. Relational Database
The relational database stores information in one or more tables of rows and columns. Each row in a table represents an entity and the columns represent the attribute of these entities.
5. Network Database
The network database is structured on the network data model. Here each record can have multiple parent records and multiple child records. Thus, the network database provides multiple access paths to the data.
6. Object-Oriented Database
It is a collaboration of object-oriented programming and a relational database. It stores in the form of objects that is nothing but the instances of the classes.
7. Hierarchical Database
A hierarchical database organizes data in a tree-like structure. Here each record has a single parent and multiple child records connected to parent records through links.