Simply what is a database and why we need a database,

What is a Database
As you know, a long time ago all most all the documentations were done by hand writing in order to store them to use again at a particular time. If you have a lots of related data that is written on lots of documents, then all those documents will be considered as a database. So, we can easily define a database as a “COLLECTION OF RELATED DATA”.
Why we need a Database
Just suppose you are running a bank and you have a lots of data about your bank account holders, so you need to STORE them in a proper way, other wise all the details of bank holders will be mixed up. And also there are some times that you have to RETRIEVE or UPDATE those stored data. To do all those operations on data you must have to manage a database.
In the past databases are created on the papers, so it was not that easy to update all the data at once and retrieve or store them quickly. That is why the computerized databases were born
In a computerized database all the stored data are organized properly so that it can be easily accessed, managed and update. In present there are some pre-built software packages that we can use easily for DEFINING, CONSTRUCTING, MANIPULATING and SHARING a database, we name that kind of software packages as Database Management System (DBMS).
It is better to know about the main four terms of a database,
- Defining – this means, identifying and defining the structure of a database, involves specifying the data types and the constraints for the data( you will learn those things in details through another blog post ).
- Constructing – storing the data on some actual physical storage that is controlled by the DBMS is known as constructing a database.
- Manipulating – updating, deleting, and retrieving a stored database is mainly known as manipulating a database.
- Sharing – sharing the created database among various users in an organization, this allows multiple users and programs to access the Database concurrently.
Examples of DBMS
- Oracle Database ,
- Postgresql,
- MySql Database,
- Microsoft Sql Server,
- MS-Access,..etc.
DBMS Languages
A DBMS uses appropriate languages and Interfaces to express its operations (Like, update the db, retrieve data, deleting)
Mainly there are four types of DBMS languages
- Data Definition Language(DDL).
- Data Manipulation Language(DML).
- Data Control Language(DCL).
- Transaction Control Language(TCL).
DDL
Simply it is used to Create Database, table, and alter them or renamed, drop comment etc. These are done by the DDL or Data Definition Language.
DML
All the Manipulations (retrieving, updating, inserting data) in the database are done by the DML
DML is divided into main two types
- High Level or Non-Procedural Languages(also called declarative languages) :- Ex: SQL, .. it only specifies what data to retrieve than how to retrieve.
- low level or procedural languages:-They specify how to retrieve data and include constructs such as looping.
DCL
This language is mainly used to handle the permission of accessing the database for users ( GRANT or REVOKE the database), provides data security.
TCL
This language is used to manage the transactions in the database. These are mainly used to manage the changes made by DML statements on the database, and allows statements to be grouped together into logical transaction.
By using SQL we can do almost all the functionality that are defined above
Classification of Databases
- Relational Database.
- Distributed Database.
- Cloud Database.
- NoSQL Database.
- Object Oriented Database.
- Graph Database.
In this part of the blog i mostly talk about the Relational databases, other type of databases will be discussed in this blog in future.
So, let’s see what is Relational Database
Relational Database is a type of database that works on the relations among various tables in the database, because of this concept we can access the same data in different ways. And all the manipulation can be done easily
The Relational database concept is firstly introduced by E.F Codd at IBM in 1970. the most important thing in the relational database as I identified is the organization of the tables, how the columns and rows in a table are organized, how each of the table in the database is related to other tables, what are the columns in a table that are retrieved from another table, these are the key points in relational databases. We will discuss more details about those key points.
After this post, I will discuss more details about Postgresql in order to manage a small database inside your computer ( all the psql statemets and the way they are used will be discussed in other posts). So you can see and understand all the theoretical facts in a practical way.
Next post will be PSQL( What is PSQL, how to install it in our machine, how to work with it, how to manage database using PSQL will be discussed).
Useful links to visit websites to see more details about Computerized databases( I highly recommend you to visit and read those websites).
About Databases
https://searchsqlserver.techtarget.com/definition/database
https://en.wikipedia.org/wiki/Database
About DBMS Languages
https://www.tutorialspoint.com/Database-Languages
About Commands of TCL
That’s helpful
LikeLike