What is database and definition of different types of database?
In today's digital world data is more valuable than ever before. Data is the key to the smooth functioning of everything from a government to a local company. The success of a company depends on how well they utilize their data.
Before we talk about database it's important to
understand data. Data can be anything and everything any information or fact can
be considered as data. Your name, age, date of birth or any other information
such as your house address, your bank balance the vehicle you drive or even the
food that you eat can be considered as data. Details related to a school or a technology
or statistics or even mathematic scan be considered as data and can be stored
into a database. Data can be in any form such as an image or a video or a file or
even a plain text data in any of this format can be stored into a database. For
a school data can be detailed related to its teachers or its students or the
subjects they teach. All of these can be data as you can see data can be anything
and everything and data can be in any form. now that you know what data is it's
time to understand where do we store them and the purpose of storing them.
What is database?
Database can be considered as a container filled with data or information which is electronically stored in a computer system. Data in any form can be stored into the database. The purpose of storing the data into the database is. so, it can be easily accessed modified protected and analyzed. you may already be using database in your day-to-day activities because most of the websites or mobile applications today such as google, Instagram, WhatsApp, fakebook already used database to store data. As an example, let's say for a college demo project plan to develop a simple college timesheet web application. Basically, this application should allow you to login through a URL and then have options to enter
· Staff details
·
Timesheet details
·
Student attendance
·
Student marks etc.
Since this is a college demo project, may just use
personal computer to develop this project. The first thing of application will need
is a database to store and retrieve the data. hence you need to first install a
database on your laptop which will connect to this timesheet application. Like
any other software installed on your computer. Database software will also be
allocated to a specific location in your computer hard drive. Through your web
application whenever you try to save edit or retrieve information. The
application will actually connect to the database to store modify or extract
the data.in other words any information that is shown in your application is
actually being retrieved from the database and any information you enter in the
application will actually be stored into the database. But since the database
is installed on your computer the data is actually being stored into your
computer memory. This is a simple example of how an application uses a small
database to store modify and retrieve data. when it comes to bigger
applications or bigger companies, they need huge database to store huge data
which may be installed on large servers. This is true to any application that uses
a database the images videos or posts or any other information that you see on fakebook
is actually stored in a database and whenever you search for a specific post or
friend fakebook, actually searches for this data in its database.
So, is database same as DBMS lot of people referred to
database as DBMS but that's not entirely correct because database is just a
container that stores data. whereas DBMS or database management system is a
software which is used to manage your database. you need DBMS to interact with
the database to store modify retrieve and protect data. DBMS is also required
to create modify and delete database users can use DBMS to enter commands in a
specific language to interact with the database. Examples of DBMS can be MySQL,
PostgreSQL, mongo dB, neo4j, Cassandra etc.
Define different types of database?
Evolution of database started in 1960.When the first type of database was made which was the flight file database. Here the data was stored in simple files such as csv file or fixed length file etc. Later on came the hierarchical database and then the network database both of this database stored data through parent-child relationship. But both of these databases were in capable of storing complex data relationships. Hence were soon replaced by relational database. Today’s world there are mainly two popular database types,
·
Relational database
·
Non-relational database.
As per the usage over 74 percent of the database used today
are relational database but due to the immense rising data usage over the past
decade mainly due to social media platforms. Non-relational database has become
very popular. However, the biggest companies today who store data related to
millions of users every day generally use combination of both relational and
non-relational database. Hence both these database types are very popular and
widely used. Oracle is the most widely used relational database, whereas MANGOBD
is the most widely used non-relational database. Let’s briefly look at each of
these database types.
Relational database:
In a relational database data is stored through collection of tables. These tables are related to one another. Each table consists of columns and rows. Each column has a name and a data type. Data type can be said as a data rule which is associated to every column. Only those data that satisfy this data rule can be inserted in the specific column. A row can be treated as a record which is formed by single or multiple columns. As an example, if we consider an office database it will have information related to employees’ managers and departments these details are stored in different tables. But these tables will be related to each other through certain columns. Employee and manager table is related through the manager id column which is present in both tables. In a relational database foreign key constraint is used to form relation between different tables. Similarly, manager and department tables are related through the department id column. Employee and the department table are not directly related to each other but still it is possible to fetch data from the employee table based on specific conditions from the department table. This is how relational database works. Information is scattered across multiple tables which are related to one another. Hence using table relations, it is possible to retrieve data from different tables in a relational data base using DBMS you can enter commands in specific language to store retrieve and modify data. This specific language is,
SQl and structured query language.
SQL is a programming language which follows a standard format for querying data across different relational database. Most of the financial institutions such as bank or insurance companies use relational database. Examples of relational database are,
·
Oracle
·
MySQL
·
Microsoft SQl server
·
PostgreSQL
Non-relational database:
When it comes to a non-relational database there are several categories of database. such as,
·
Key value database
·
Document database
·
Graph database
·
Wide column database
·
Search engine database
·
Time series database.
Each of these database store data differently and are
useful for managing specific types of data. Let’s briefly look at a few of them.
Key value database: it’s also called as key value store .it is the simplest of the non-relational database and as the name suggest every data stored in this database will be assigned to a key. To store data, you provide a key and a blob of data such as an image, text file, json object etc. Once saved to retrieve the data just provide the key. Key value database is very useful to store certain types of data such as configuration data state information or any data that might be represented by a dictionary or a hash in a programming language. Examples can be Redis database Memcached database etc.
Document database: It’s also called as document store. These also use unique key to identify data stored in database. However, unlike key value store document database store data in structured format called documents. Often using Json, vsan or xml format. Though each document within this database has structured data. There is no specific format to be followed for all documents. Each document can have its own structure which the database understands. so unlike key value stores the data stored in document database can be queried and analyzed. Examples can be mongo dB, CouchDB etc.
Graph database: Graph database falls under the bracket of non-relational database and follows a different approach to forming relationships between data. Rather than using tables and foreign keys to form relation graph database forms relation by using nodes edges and properties. Data is represented through individual nodes and each node can have multiple properties. Between these nodes edges or relationships are established to represent different types of connections. Hence in a graph database data is stored as node and relationships are represented through edges. if you are working with data where relationships or connections between data are most important, then graph database is the right choice. Graph database is useful when searching for specific pattern like fraud detection through money laundering transactions. Example can be neo4j database.
Wide column database: Also known as column family database. wide column database store data using rows and columns but they do not use tables. Instead of tables they use structure called as column families column families contain rows of data. Where each row has its own structure or schema. Each row comprises of unique row identifier and sets of column names and values, each row can have different number of columns with different types of data. Examples can be Cassandra, Edge Base etc.
Search Engine Database: This can handle full text search faster than relational database system. An e-commerce website is using search engine database for autocompletes and suggestion for their customers. These can sort relational characteristics such as name, price and categories release data and display the result as a structural view.
Time series Database: These databases are basically optimized for timestamp and timeseries data. It’s mean measurements and events which are tracked, aggregated, collected, monitored over a period of time. Time series database can collect data from heartbeat of motion tracking sensors. JVM matrix from the java application, market analyzing data, network related data, API response and process, uptime are related to time series database system.
মন্তব্যসমূহ
একটি মন্তব্য পোস্ট করুন