DBMS Basics
DBMS Basics
Our DBMS Tutorial includes all topics of DBMS such as introduction, ER model, keys, relational model, join operation,
SQL, functional dependency, transaction, concurrency control, etc.The database is a collection of inter-related data
which is used to retrieve, insert and delete the data efficiently. It is also used to organize the data in the form of a
table, schema, views, and reports, etc.
For example: The college Database organizes the data about the admin, staff, students and faculty etc.
Using the database, you can easily retrieve, insert, and delete the information.
DBMS provides an interface to perform various operations like database creation, storing data in it, updating data,
creating a table in the database and a lot more.It provides protection and security to the database. In the case of
multiple users, it also maintains data consistency.
1. Data Definition: It is used for creation, modification, and removal of definition that defines the organization of
data in the database.
2. Data Updation: It is used for the insertion, modification, and deletion of the actual data in the database.
3. Data Retrieval: It is used to retrieve the data from the database which can be used by applications for various
purposes.
4. User Administration: It is used for registering and monitoring users, maintain data integrity, enforcing data
security, dealing with concurrency control, monitoring performance and recovering information corrupted by
unexpected failure.
Characteristics of DBMS
➢ It uses a digital repository established on a server to store and manage the information.
➢ It can provide a clear and logical view of the process that manipulates data.
➢ DBMS contains automatic backup and recovery procedures.
➢ It contains ACID properties which maintain data in a healthy state in case of failure.
➢ It can reduce the complex relationship between data.
➢ It is used to support manipulation and processing of data.
➢ It is used to provide security of data.
➢ It can view the database from different viewpoints according to the requirements of the user.
Advantages of DBMS
➢ Controls database redundancy: It can control data redundancy because it stores all the data in one single
database file and that recorded data is placed in the database.
➢ Data sharing: In DBMS, the authorized users of an organization can share the data among multiple users.
➢ Easily Maintenance: It can be easily maintainable due to the centralized nature of the database system.
➢ Reduce time: It reduces development time and maintenance need.
➢ Backup: It provides backup and recovery subsystems which create automatic backup of data from hardware and
software failures and restores the data if required.
➢ multiple user interface: It provides different types of user interfaces like graphical user interfaces, application
program interfaces
Disadvantages of DBMS
➢ Cost of Hardware and Software: It requires a high speed of data processor and large memory size to run DBMS
software.
➢ Size: It occupies a large space of disks and large memory to run them efficiently.
➢ Complexity: Database system creates additional complexity and requirements.
➢ Higher impact of failure: Failure is highly impacted the database because in most of the organization, all the
data stored in a single database and if the database is damaged due to electric failure or database corruption
then the data may be lost forever.
Types of Databases
1) Centralized Database
It is the type of database that stores data at a centralized database system. It comforts the users to access the stored
data from different locations through several applications. These applications contain the authentication process to
let users access data securely. An example of a Centralized database can be Central Library that carries a central
database of each library in a college/university.
1. Homogeneous DDB: Those database systems which execute on the same operating system and use the same
application process and carry the same hardware devices.
2. Heterogeneous DDB: Those database systems which execute on different operating systems under different
application procedures, and carries different hardware devices.
3) Relational Database
This database is based on the relational data model, which stores data in the form of rows(tuple) and
columns(attributes), and together forms a table(relation). A relational database uses SQL for storing, manipulating,
as well as maintaining the data. E.F. Codd invented the database in 1970. Each table in the database carries a key
that makes the data unique from others. Examples of Relational databases are MySQL, Microsoft SQL Server, Oracle,
etc.
1. A means Atomicity: This ensures the data operation will complete either with success or with failure. It follows
the 'all or nothing' strategy. For example, a transaction will either be committed or will abort.
2. C means Consistency: If we perform any operation over the data, its value before and after the operation should
be preserved. For example, the account balance before and after the transaction should be correct, i.e., it
should remain conserved.
3. I means Isolation: There can be concurrent users for accessing data at the same time from the database. Thus,
isolation between the data should remain isolated. For example, when multiple transactions occur at the same
time, one transaction effects should not be visible to the other transactions in the database.
4. D means Durability: It ensures that once it completes the operation and commits the data, data changes should
remain permanent.
4) NoSQL Database
Non-SQL/Not Only SQL is a type of database that is used for storing a wide range of data sets. It is not a relational
database as it stores data not only in tabular form but in several different ways. It came into existence when the
demand for building modern applications increased. Thus, NoSQL presented a wide variety of database technologies
in response to the demands. We can further divide a NoSQL database into the following four types:
1) Key-value storage: It is the simplest type of database storage where it stores every single item as a key (or
attribute name) holding its value, together.
2) Document-oriented Database: A type of database used to store data as JSON-like document. It helps developers
in storing data by using the same document-model format as used in the application code.
3) Graph Databases: It is used for storing vast amounts of data in a graph-like structure. Most commonly, social
networking websites use the graph database.
4) Wide-column stores: It is similar to the data represented in relational databases. Here, data is stored in large
columns together, instead of storing in rows.
5) Cloud Database
A type of database where data is stored in a virtual environment and executes over the cloud computing platform. It
provides users with various cloud computing services (SaaS, PaaS, IaaS, etc.) for accessing the database. There are
numerous cloud platforms, but the best options are:
6) Object-oriented Databases
The type of database that uses the object-based data model approach for storing data in the database system. The
data is represented and stored as objects which are similar to the objects used in the object-oriented programming
language.
7) Hierarchical Databases
It is the type of database that stores data in the form of parent-children relationship nodes. Here, it organizes data in
a tree-like structure.
Data get stored in the form of records that are connected via links. Each child record in the tree will contain only one
parent. On the other hand, each parent record can have multiple child records.
8) Network Databases
It is the database that typically follows the network data model. Here, the representation of data is in the form of
nodes connected via links between them. Unlike the hierarchical database, it allows each record to have multiple
children and parent nodes to form a generalized graph structure.
9) Personal Database
Collecting and storing data on the user's system defines a Personal Database. This database is basically designed for a
single user.
Although DBMS and RDBMS both are used to store information in physical database but there are some remarkable
differences between them.
The main differences between DBMS and RDBMS are given below:
1) DBMS applications store data as file. RDBMS applications store data in a tabular form.
2) In DBMS, data is generally stored in either a hierarchical form or a navigational form. In RDBMS, the tables have
an identifier called primary key and the data values are stored in the form of tables.
3) Normalization is not present in DBMS.Normalization is present in RDBMS.
4) DBMS does not apply any security with regards to data manipulation. RDBMS defines the integrity constraint for
the purpose of ACID (Atomocity, Consistency, Isolation and Durability) property.
5) DBMS uses file system to store data, so there will be no relation between the tables In RDBMS, data values are
stored in the form of tables, so a relationship between these data values will be stored in the form of a table as well.
6) DBMS has to provide some uniform methods to access the stored information. RDBMS system supports a tabular
structure of the data and a relationship between them to access the stored information.
7) DBMS does not support distributed database.RDBMS supports distributed database.
8) DBMS is meant to be for small organization and deal with small data. it supports single user. RDBMS is designed
to handle large amount of data. it supports multiple users.
9) Examples of DBMS are file systems, xml etc. Example of RDBMS are mysql, postgre, sql server, oracle etc.
● DBMS gives an abstract view of data that hides the details. File system provides the detail of the data
representation and storage of data.
● DBMS provides a crash recovery mechanism, i.e., DBMS protects the user from the system failure. File system
doesn't have a crash mechanism, i.e., if the system crashes while entering some data, then the content of the
file will lost.
● DBMS provides a good protection mechanism. It is very difficult to protect a file under the file system.
● DBMS contains a wide variety of sophisticated techniques to store and retrieve the data. File system can't
efficiently store and retrieve the data.
● DBMS takes care of Concurrent access of data using some form of locking. In the File system, concurrent access
has many problems like redirecting the file while other deleting some information or updating some information.