DBMS Introduction 1
DBMS Introduction 1
DBMS Introduction 1
-->What is Database?
A database is an organized collection of data, so that it can be easily accessed
and managed.
The main purpose of the database is to operate a large amount of information
by storing, retrieving, and managing data.
-->What is DBMS?
>Design to fulfill the need for small and >It is only limited to smaller DBMS
large businesses systems.
-->Advantages of DBMS
● DBMS offers a variety of techniques to store & retrieve data
● DBMS serves as an efficient handler to balance the needs of multiple
applications using the same data
● Uniform administration procedures for data
● Application programmers are never exposed to details of data representation
and storage.
● A DBMS uses various powerful functions to store and retrieve data efficiently.
● Offers Data Integrity and Security
● The DBMS implies integrity constraints to get a high level of protection against
prohibited access to data.
● A DBMS schedules concurrent access to the data in such a manner that only one
user can access the same data at a time
● Reduced Application Development Time
-->Disadvantage of DBMS
DBMS may offer plenty of advantages but, it has certain flaws-
● The cost of Hardware and Software of a DBMS is quite high which increases the
budget of your organization.
● Most database management systems are often complex systems, so training for
users to use the DBMS is required.
● In some organizations, all data is integrated into a single database which can be
damaged because of electric failure or database is corrupted on the storage
media
● The use of the same program at a time by many users sometimes leads to the
loss of some data.
● DBMS can’t perform sophisticated calculations
user is not required to write the this system, the user has to write the
DBMS gives an abstract view of data that A file system provides the detail of the
mechanism, i.e., DBMS protects the user mechanism, i.e., if the system crashes
DBMS takes care of Concurrent access of In the File system, concurrent access has
data using some form of locking. many problems like redirecting the file
-->Database Language:
DDL – Data Definition Language
DQL – Data Query Language
DML – Data Manipulation Language
DCL – Data Control Language
TCL – Transaction Control Language
DDL(Data Definition Language): DDL or Data Definition Language actually consists
of the SQL commands that can be used to define the database schema. It simply deals
with descriptions of the database schema and is used to create and modify the
structure of database objects in the database.
Examples of DDL commands:
CREATE – is used to create the database or its objects (like table, index, function, views,
store procedure, and triggers).
DROP – is used to delete objects from the database.
ALTER - is used to alter the structure of the database.
TRUNCATE – is used to remove all records from a table, including all spaces allocated
for the records are removed.
COMMENT –is used to add comments to the data dictionary.
RENAME –is used to rename an object existing in the database.
DQL (Data Query Language): DQL statements are used for performing queries on the
data within schema objects. The purpose of the DQL Command is to get some schema
relation based on the query passed to it.
Example of DQL:
SELECT – is used to retrieve data from the database.
DML(Data Manipulation Language): The SQL commands that deals with the
manipulation of data present in the database belong to DML or Data Manipulation
Language and this includes most of the SQL statements.
Examples of DML:
INSERT – is used to insert data into a table.
UPDATE – is used to update existing data within a table.
DELETE – is used to delete records from a database table.
DCL(Data Control Language): DCL includes commands such as GRANT and REVOKE
which mainly deal with the rights, permissions, and other controls of the database
system.
Examples of DCL commands:
GRANT - gives users access privileges to the database.
REVOKE - withdraw user’s access privileges given by using the GRANT command.
Instances in DBMS
In simple words, it is the snapshot of the database taken at a particular moment. It can
also be described in a more significant way as the collection of the information stored
in the database at that particular moment. The instance can also be called as the
database state or current set of occurrences due to the fact that it is information that is
present at the current state.
Schema in DBMS
It is the overall description or the overall design of the database specified during the
database design. An important thing to be remembered here is it should not be
changed frequently. Basically, it displays the record types(entity), names of data
items(attribute) but not the relation among the files.