Transcript for:
Overview of Database Concepts and Types

Hey guys, welcome. 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 vastly depends on how well they utilize their data.

This is where database comes into picture. You need a database to store data. In this video, let's learn what is database and the different types of database available today. But first, let's talk about database.

Before we talk about database, it's important to understand data. 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 mathematics can 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 details 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, Facebook already use database to store data. As an example, let's say for your college demo project you 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, you may just use your personal computer to develop this project.

The first thing your application will need is a database to store and retrieve the data. Hence, you will need to have a database to store your data. 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 a 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 Facebook is actually stored in a database. And whenever you search for a specific post or friend, Facebook actually searches for this data in its database. So, is database same as DBMS?

Lot of people refer 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 like you and me can use DBMS to enter commands in a specific language to interact with the database.

Examples of DBMS can be MySQL, PostgreSQL, MongoDB, Neo4j, Cassandra, etc. Evolution of database started in 1960s when the first type of database were made which was the flat 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 these database stored data through parent-child relationship but both of these database were incapable of storing complex data relationships hence were soon replaced by relational database. you Fast forward to 2020, in today's world there are mainly two popular database types, relational database and non-relational database. As per the usage, over 74% of the database used today are relational database.

But due to the immense rise in data usage over the past decade, mainly due to social media platforms, non-relational database have 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 MongoDB 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. Here, employee and manager table is related through the manager ID column, which is present in both these 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. As you can see, 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 database, using DBMS, you can enter commands in specific language to store, retrieve and modify data. This specific language is SQL or Structured Query Language. SQL is a programming language which follows a standard format for querying data across different relational databases.

Most of the financial institutions such as banks or insurance companies use relational databases. Examples of relational databases are Oracle, MySQL, Microsoft SQL Server, PostgreSQL, etc. Non-Relational Database When it comes to a non-relational database, there are several categories of database, such as Key-Value Store, Document Database, Graph Database, Wide-Column Database, Search Engine Database, Time Series Database, etc.

Each of these databases store data differently and are useful for managing specific types of data. Let's briefly look at a few of them. Key Value Database, also called as Key Value Store.

It is the simplest of the non-relational database and as the name suggests, 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 are 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, Memcache database etc. Document database 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, BSAN 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 store, the data stored in document database can be queried and analyzed.

Examples can be MongoDB, 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 etc. 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 space etc.