DBMS
DBMS
By Ijaz Ahmad
Data is nothing but facts and statistics stored or free flowing over a
network, generally it's raw and unprocessed. For example: When you
visit any website, they might store you IP address, that is data, in
return they might add a cookie in your browser, marking you that you
visited the website, that is data, your name, it's data, your age, it's
data.
A Database is a collection of related data organised in a way that data can be easily
accessed, managed and updated. Database can be software based or hardware based,
with one sole purpose, storing data.
During early computer days, data was collected and stored on tapes, which were mostly
write-only, which means once data is stored on it, it can never be read again. They were
slow and bulky, and soon computer scientists realised that they needed a better solution
to this problem.
Larry Ellison, the co-founder of Oracle was amongst the first few, who realised the
need for a software based Database Management System.
What is DBMS?
MySql
Oracle
SQL Server
IBM DB2
PostgreSQL
1. Data stored into Tables: Data is never directly stored into the database. Data is stored
into tables, created inside the database. DBMS also allows to have relationships between
tables which makes the data more meaningful and connected. You can easily understand
what type of data is stored where by looking at all the tables created in a database.
2. Reduced Redundancy: In the modern world hard drives are very cheap, but earlier when
hard drives were too expensive, unnecessary repetition of data in database was a big
problem. But DBMS follows Normalisation which divides the data in such a way that
repetition is minimum.
3. Data Consistency: On Live data, i.e. data that is being continuosly updated and added,
maintaining the consistency of data can become a challenge. But DBMS handles it all by
itself.
4. Support Multiple user and Concurrent Access: DBMS allows multiple users to work on
it(update, insert, delete data) at the same time and still manages to maintain the data
consistency.
5. Query Language: DBMS provides users with a simple Query language, using which data
can be easily fetched, inserted, deleted and updated in a database.
6. Security: The DBMS also takes care of the security of data, protecting the data from un-
authorised access. In a typical DBMS, we can create user accounts with different access
permissions, using which we can easily secure our data by restricting user access.
7. DBMS supports transactions, which allows us to better handle and manage data
integrity in real world applications where multi-threading is extensively used.
Advantages of DBMS
Seamless integration into the application programming languages which makes it very
easier to add a database to almost any application or website.
Disadvantages of DBMS
It's Complexity
Except MySQL, which is open source, licensed DBMSs are generally costly.
Components of DBMS
The database management system can be divided into five major
components, they are:
1. Hardware
2. Software
3. Data
4. Procedures
Let's have a simple diagram to see how they all fit together to form a
database management system.
Data is that resource, for which DBMS was designed. The motive
behind the creation of DBMS was to store and utilise data.
In a typical Database, the user saved Data is present and meta data is
stored.
User can create new databases, tables, insert data, fetch stored data,
update data and delete the data using the access language.
Users
For the end user, the GUI layer is the Database System, and the end
user has no idea about the application layer and the DBMS system.
If you have used MySQL, then you must have seen PHPMyAdmin, it
is the best example of a 3-tier DBMS architecture.
Hierarchical Model
Network Model
Entity-relationship Model
Relational Model
Hierarchical Model
In this model, a child node will only have a single parent node.
This was the most widely used database model, before Relational
Model was introduced.
Entity-relationship Model
Relational Model
This model was introduced by E.F Codd in 1970, and since then it has
been the most widely used database model, infact, we can say the only
database model used around the world.
The basic structure of data in the relational model is tables. All the
information related to a particular type is stored in rows of that table.