In this article we will discuss the type of data that is concerned with storages that exist in computers and are readable and used by computers. We will also discuss all the different types of data storages that are present. We will also discuss what is Sequential Query Language and how it helps in handling databases.
Data is stored in computers in the form of binary digits i.e. 1’s and 0’s. The main processing unit in a computer is known as the CPU i.e. Central Processing Unit and its main task is to process data that is fed to it. A Central Processing Unit (CPU) consists of three parts:
- Memory or Storage Unit
- Control Unit
- Arithmetic Logic Unit (ALU)
Memory unit consists of a set of instructions which contains information about the tasks that are to be executed and how these tasks are to be executed. It also consists of data and intermediate results. This unit is commonly known as Random Access Memory (RAM). It is also known as the primary storage unit, internal storage unit or main memory of the system. The size of RAM plays an important role in determining the processing power of the system and the capability of the system in handling data. Some of the tasks performed by RAM are:
- It has the instructions stored in it and guides the system on how to process the data stored in it.
- It consists of the results of the processing performed.
- All the inputs from the external devices and outputs from the internal devices are transmitted through the RAM.
Control Unit is not directly involved in any data processing; rather its task is to control the operations conducted by all parts of the computer. The main functions of control unit include:
- Its responsibility is to control the transfer of data among the other units of the system
- Its responsibility is to control the flow of instructions to the units of the system
- It helps in communicating the transfer of data and instruction between all the input devices and output devices
- Its function is not to store any kind of data or instruction.
Arithmetic Logic Unit (ALU) is made up of two components which are as follows:
- Arithmetic section: In this section four major arithmetic operators are used which include addition, multiplication, subtraction, and division. All other operations, no matter how complex they are, are done by using all the above mentioned operators.
- Logic section: In this section the decisions are made on the basic of logical operations such as comparing, merging, selecting, and matching of data.
Having discussed this now we have a rough idea of what a CPU is made up of. Now we will discuss how these different parts combine to help a CPU process data. Simply put, the process of processing data by a CPU can be divided into three steps which are as follows:
- Instructions are fetched from RAM or internal memory.
- The instructions fetched are decoded by the processor and then it processes the information present in the instruction to figure out what task needs to be performed and how.
- The instructions are processed and the tasks are executed according to the given instructions.
In order to have a good understanding of what SQL is and what is it used for? First we will have to understand what data is and what are databases? Because SQL is a language of databases.
Data can be defined as anything that is definite and can be defined by certain measures such as age, weight height, etc. Data can also be anything that can be collected, stored, and used to describe things such as names, dimensions of a room, number of pixels in an image or TV screen, etc.
There are many different types of data but the most common types are as follows:
- Single character i.e. all the alphabets
- Text i.e. strings which in simple words mean sentences and words.
- Numbers i.e. integers (1, 2, 3, 4….) and floats (1.233, 2.343, 2.33….)
In simple words, databases can be defined as a symmetric collection of data. The data stored in databases is arranged on the basis of any criteria set by the individual that is making the database. The storages in which databases are present are supported by electronic storages. One of the most important benefits of databases is that it makes handling a huge amount of data easy.
Let’s explain the need of databases with the example of an electricity billing company. Electricity Company stores the data of its users in a database which has the fields of customer name, bills, phone numbers, and addresses. The electricity company uses this database to manage the billing operations, handling fault data, and handling client related issues. Another example can be of Google. It needs to store, alter, manipulate, and find data for its users at a rapid pace and this task is made possible by the help of databases as they make data handling, manipulation and addition easy.
Components of a Database
In general there are three major components of a Database. These components are as follows:
- Hardware: The hardware part of a database consists of all the physical aspects of the database. There are a lot of physical devices that are used in the making of a database. These devices offer an interface between the systems present in the real world and computers. These devices are named as follows:
- Storage devices
- I/O devices
- Software: The software part of the database consists of all the programs and applications that are used by the computers and devices that are the part of the database. This includes a lot of software that are as follows:
- Operating systems
- Network software that are used to share data to users
- Database software
- Applications used to get data from the database
- Data: We have already discussed what data is. Initially data is in a much unorganized form and this type of data is known as raw data. In order to make sense of this data it needs to be organized first. The main task of these databases is to store data in organized form so it can be accessed and used later for different purposes and tasks.
Types of Databases
There are many types of databases that are explained as follows:
- Distributed Databases (DDB): It can be defined as a type of database in which the data is not stored in a single place rather it is distributed on all the systems present in a specific computer network. The distributed data in such databases can be accessed from any network component or node and the interface to access these databases is same for everyone in the network. The files in such databases are logically interrelated to each other, well defined and structured, and are physically distributed among the network.
- Relational Databases: It is a type of database that can be defined as a database in which the data is stored in the form of tables and all the data is stored in a tabular manner. As we all know tables consist of columns and rows. The columns in such databases define the category of data whereas the rows define or store the records in them. In database language, these tables are called relations and rows, which contain the data defined by the categories, are called as table records. Such types of databases are very common these days and most of the types of SQL such as Microsoft SQL Server database, MySQL, and Oracle work on these types of databases. Telecommunication companies use such databases to keep the data of their customers, alter this data according to the ever changing conditions, and query this data for various purposes.
- Object-Oriented Databases: It is a type of database in which the data is stored in the form of objects. For those of you who have studied object oriented programming they might know what an object is but for those who have not studied it let me explain what an object is. An object can be defined as an entity or a type of data that is defined by the developer. It can consist of various properties. For example if you define an object with the name of driving license and then in that object you define all the fields that are required for a driving license i.e. name, address, date of birth, and phone number. Now instead of defining all these terms again and again for every driving license you will just call this object and fill in the fields. Such type of .databases are used in live or real-time systems where we require high speed processing
- Centralized Databases: It is a type of database that is opposite to a distributed database. In such databases the data is stored at a single centralized point and it is accessible from many points. These types of databases allow the users in the network to access them from various points and even on remote machines working in remote locations. Such databases are easy to handle as all the equipment is in one place and in case of increasing the physical memory new storage devices can be added easily. The security of these databases is also better and they are safer to work with.
- Open-source Databases: As the name suggests such databases are free to be used by anyone or any business. Such types of databases give users the freedom to develop their own databases depending upon their own needs and requirements. The best thing about such databases is that they are free to use and can be shared with anyone. Due to the rise of social media and advancements in the field of Internet of Things (IoT) the data production has increased substantially and these databases can be made to store this data, observe it, and then predict trends on the basis of the data stored in these databases. These systems are highly flexible and cost efficient.
- Cloud Databases: In order to understand such databases firstly we will have to familiarize ourselves with the concept of cloud. Cloud can be defined as a cluster of servers that consist of databases and are running applications that are required by the users. These servers are present in data centers that can be thousands of miles away from the users but the users can still access them using the ip addresses of the servers. Cloud databases are created because of their accessibility as they can be accessed from any part of the world. The only thing that the user needs is a stable internet connection and a computer. Another advantage of such databases is that they offer high scalability and in case of any disaster the data is still safe and can be recovered easily
- Data Warehouses: Data Warehouses can be defined as a massive storage of data that is stored by a certain company. These massive amounts of data is analyzed by the company and is used in making future decisions. The company uses different data analysis techniques to analyze this data and then on the basis of the findings of this data decisions are made.
- NoSQL Databases: It is a type of database in which the data is not stored in tabular form rather it is stored in other forms. Some major types of NoSQL databases are as follows:
- Document Databases: In such databases the data is stored in the form of documents and each document consists of various fields. All sorts of data can be stored in such documents such as strings, integers, objects, and arrays. Due to this advantage they can store a large variety of data in them.
- Key-Value Databases: It is a type of database in which values are stored against keys. If we want to reference a certain value we have to enter its key. Such types of databases can be used for cases in which we do not require to run complex queries to get data but need to just access data with one query.
- Wide-Column stores: These types of databases store data in the form of rows, tables, and dynamic columns. In these types of stores the data is not divided into fields depending upon the columns rather they are stored in rows and are depicting the data related to the first element in the row. Such stores are used commonly to store data in the Internet of Things (IoT) industry. The IoT device data is stored against the name of the user that is using that device.
- Graph Databases: These types of databases are used in the industries where there is a need to find patterns between different factors and how they influence each other. Such databases have two data storage points which are as follows:
- Nodes: This factor commonly stores information about things, events, attributes related to people and places, etc.
- Edges: This factor stores the relationship between the factors present in nodes.
This type of database is used in fraud detection, search engines use them to generate recommendations for their users, etc. Most of the social media campaigns use such graph databases to target their audiences and plan their marketing campaigns accordingly.
Database Management Systems (DBMS)
As the name suggests it is a type of management system that manages the databases and is used to help databases in storing data and also helps in predicting ways that make it easier to retrieve data from these databases. In simple words it is an easier way to manage databases. The main responsibilities of Database Management Systems (DBMS) are:
- Help sort and store information present in the databases.
- Help access the stored data in the databases and also help in modifying it.
- Keeping the logic structure of the database intact and logical.
Components of DBMS
The components of Database Management Systems (DBMS) are as follows:
- Hardware: The hardware of DBMS includes computer, I/O devices, storage devices, etc.
- Software: This software is the main part of DBMS as it allows the users to access the data present in the databases and play with it. This software is able to understand high level languages such as Database access languages and convert them into low level languages that are understood by the machines such as databases.
- Procedures: These are the important and basic instructions that need to be followed when using Database Management Systems (DBMS). The DBMS comes with a document that consists of all the guidelines that will help users in managing databases, designing databases according to their requirements, modifying the existing databases, and processing the existing databases.
- Database languages: There are four major tasks that are done by the Database Management Systems (DBMS). These tasks are as follows:
- Store and define data on databases
- Modifying and manipulating data on databases
- Access data on databases
- Control user access and data on databases
The languages used by Database Management System (DBMS) to achieve these task are as follows:
- Data Definition Language (DDL)
- Data Manipulation Language (DML)
- Database Access Language (DAL)
- Data Control Language (DCL)
- Query processor: As the name of this processor suggests, the task of this component of Database Management System (DBMS) is to help communicate the requests between the users using the DBMS and the DBMS data engine. The language that the users are using to work on databases is categorized as a high level language.An example of high level language is SQL. This high level language is not understandable by the machines working in the DBMS. So, this high level language is converted into a low level language that is understood by the machines that have to perform given tasks. This is the task of the query processor.
- Runtime database manager: This can be categorized as the management tool present in the DBMS. This manager handles all the queries made by the customer, checks if the users that are making the queries are authentic or not, helps in processing the queries that are approved, and also helps in making a plan about how the queries are to be executed. It also helps in maintaining the concurrency of the service i.e. allows multiple users to access the services at one time. Another task of this manager is to ensure that the integrity of the data is being stored.
- Database Manager: The task of this manager is to handle the data that is present inside the databases that are associated and linked with the Database Management System (DBMS). It has the rights to allow a set of commands to work on the databases present in DBMS. These commands can create or delete databases, clone existing databases, creating a backup for these databases, restoring the databases, and other activities related to the databases present in DBMS. It is also used to update the databases if the vendor comes up with a new patch or product upgrade.
- Database engine: This performs the core functionalities of DBMS that are related to the retrieval of data and storage of the data in databases.
- Reporting generator: It is a very important component of the DBMS. It is used to generate reports about the useful information that is extracted from the databases and DBMS files. The data displayed in these files is according to the requirements of the customer and can be changed in case the requirements are updated. The information obtained from these reports is then used to make informed decisions that play a vital role in the user’s progress and business growth.
In this article we have discussed what is data and how can it be stored in such a way that it can benefit us. Data stored in an organized manner which is easily readable is known as a database and with the help of these databases we can do many tasks. These databases are used in almost all the businesses these days therefore having their understanding is a must in today’s world. Reading this article would have given you enough insight about this topic and hopefully has triggered your interest in this amazing field.