Introduction to DBMS
DBMS: A DataBase Management System is simply a program that stores data into a storage space. It knows how to sort and filter the data with various parameters and often does some processing with data.
It can also organise the data in an optimal structure such that its faster to sort and filter them.
DBMS or RDBMS ?
- DBMS is generally a management program for data.
- RDBMS is a DBMS that organize data based on tables, data is organized as rows and columns inside a table structure.
- Other DBMS stores data in a different format, mostly document structure similar to JSON
Why do we need Database Management Program?
A DBMS is needed to organize and serve requests of clients on collections of data.
Consider a library in real life
Scenario: A Reader walks up to the librarian for a book.
- An organized library with shelves will be easier to browse and deliver the item fast to the client.
- If the library is just a dump of books which is scattered throughout, it’s way difficult to find the required book, searching all of them one by one.
We, the owner has to describe all types of books we will be stocking to the Librarian. And the librarian will use the building space and organize everything.
Similarly, We describe our data schema to DBMS so that it can organize files in disk and serve data fast as queried.
An RDBMS can be explained by relating to a librarian.
In our Magic Library,
- Owner of the library is us, the user of the computer
- Librarian is the RDBMS
- Author or Reader who can add, read, update or remove books via Librarian are Applications
- Shelves are tables, Books are the row in the tables.
- Everyone speaks a language called SQL