0% found this document useful (0 votes)
23 views17 pages

Introduction To DBMS

The document provides an introduction to database management systems (DBMS). It defines key terms like data, database, and DBMS. It describes the basic components and functions of a DBMS, including data storage and retrieval, concurrency control, and backup/recovery. It also covers relational database concepts like tables, keys, and the SQL language.

Uploaded by

royroboy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
23 views17 pages

Introduction To DBMS

The document provides an introduction to database management systems (DBMS). It defines key terms like data, database, and DBMS. It describes the basic components and functions of a DBMS, including data storage and retrieval, concurrency control, and backup/recovery. It also covers relational database concepts like tables, keys, and the SQL language.

Uploaded by

royroboy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 17

Introduction to

DBMS
Basic Terms
● Data: The raw facts are called data. The word “raw” indicates that they have not
been processed, meaning having no particular meaning. Eg. ABC, 1, 19.
● Database: Organised collection of interrelated data.
● DBMS: Stands for Database Management System

Database + Management System

● Management System: A set of programs to store and retrieve those data. It is a


software tool which helps in the efficient retrieval, insertion and deletion of
data from databases and organizes the data in the form of tables, views,
schemas, reports etc.
What is a Database Management System
● A Database Management System (DBMS) is a software for creating and
managing databases.
● DBMS makes it possible for end users to create, protect, read, update and
delete data in a database.
● It serves as an interface between databases and users or application programs
● It ensures that data is consistently organized and remains easily accessible.
DBMS Example
● In a hospital, a database management system is developed to minimize the
work of pen and paper at the hospitals.
● It is the system that is used in the hospitals to maintain the records of the
patients, doctors, nurses, and other hospital staff
● Using this the user will be able to get information about the patients,
doctors, nurses and other hospital staff just in one click but only the
authorized user will be allowed to log in with the unique username and
password.
DBMS for Large amounts of Data
● Basically developed for large amounts of data.

● When dealing with large amounts of data, two things that require optimization:
○ Storage of data and Retrieval of data.

● Before DBMS, we used File Processing System.


Advantages of DBMS over the File System
● Data redundancy and inconsistency: The same piece of information may be duplicated in many files.

● Data sharing: Sharing is too complex or even not allowed in file system. Whereas in DBMS, data can be
shared easily due to a centralized system.

● Data Searching: In file system, for each search operation, a different application program has to be
written. While in DBMS, users only have to write a query to retrieve data.

● Data Integrity: Integrity constraints are a set of rules, need to be applied to the data before inserting it
into the database. The file system does not provide any procedure to check these constraints on data
automatically. Whereas DBMS maintains data integrity by enforcing user-defined constraints on data
by itself.

● Data Security: A file system provides a password mechanism to protect the database but how long can
the password be protected? No one can guarantee that. Whereas, DBMS has specialised features that
not every user of the database system should be able to access all the data.
Key Features of DBMS
● Data modeling: A DBMS provides tools for creating and modifying data models, which define the
structure and relationships of the data in a database.
● Data storage and retrieval: A DBMS is responsible for storing and retrieving data from the
database, and can provide various methods for searching and querying the data.
● Concurrency control: A DBMS provides mechanisms for controlling concurrent access to the
database, to ensure that multiple users can access the data without conflicting with each other.
● Data integrity and security: A DBMS provides tools for enforcing data integrity and security
constraints, such as constraints on the values of data and access controls that restrict who can
access the data.
● Backup and recovery: A DBMS provides mechanisms for backing up and recovering the data in the
event of a system failure.
Components of DBMS
Components of DBMS
● Hardware: The actual computer system used for keeping and accessing the database.

● Software: It also includes the database software, operating system, network software used to share the data
with other users, and the applications used to access the data. This software component is capable of
understanding the Database Access Language and converting it into actual database commands to execute or
run them on the database. DBMS software examples include MySQL, PostgreSQL, Microsoft Access, SQL
Server, FileMaker, Oracle, RDBMS, dBASE, Clipper, and FoxPro.

● Data: The typical database contains both the metadata(data about data) and the actual(operational) data.

● Procedures: Procedures refer to general instructions to use a database management system. This includes
procedures to setup and install a DBMS, To login and logout of DBMS software, manage databases, take
backups, generate reports etc.

● Database Access Language: Database Access Language is a simple language that allows users to write
commands to perform the desired operations on the data that is stored in the database.used to write
commands to access, upsert, and delete data stored in a database. SQL(structured query language), My Access,
Oracle, etc.
Database Languages
● Data Definition Language (DDL): deals with database schemas and descriptions, of how the data should reside in the
database.

○ CREATE, ALTER, DROP, TRUNCATE, COMMENT, RENAME

● Data Manipulation Language (DML): deals with data manipulation and used to store, modify, retrieve, delete and update
data in a database.

○ SELECT, INSERT. UPDATE, DELETE, etc.

● Data Control Language (DCL): acts as an access specifier to the database.(basically to grant and revoke permissions to
users in the database

● Transactional Control Language: acts as an manager for all types of transactional data and all transactions.Some of the
command of TCL are

○ Roll Back: Used to cancel or Undo changes made in the database


○ Commit: It is used to apply or save changes in the database
○ Save Point: It is used to save the data on the temporary basis in the database
Types of DBMS
● Relational DBMS (RDBMS): Data is organized in the form of tables and each table has a set of rows
and columns. The data are related to each other through primary and foreign keys.

● NoSQL DBMS: Data is organized in the form of key-value pairs, documents, graphs, or column-based.
These are designed to handle large-scale, high-performance scenarios.

● Object-Oriented DBMS (OODBMS): An OODBMS stores data as objects, which can be manipulated
using object-oriented programming languages.
Relational Model in DBMS
● The relational model represents how data is stored in Relational Databases.
● A relational database consists of a collection of tables, each of which is assigned a unique name.
● Consider a relation STUDENT with attributes ROLL_NO, NAME, ADDRESS, PHONE, and AGE shown
in the table.
Important Terminologies
● Attribute: Attributes are the properties that define an entity. e.g.; ROLL_NO, NAME, ADDRESS
● Relation Schema: A relation schema defines the structure of the relation and represents the name of
the relation with its attributes.
a. e.g.; STUDENT (ROLL_NO, NAME, ADDRESS, PHONE, and AGE) is the relation schema for
STUDENT. If a schema has more than 1 relation, it is called Relational Schema.
● Tuple: Each row in the relation is known as a tuple. The above relation contains 4 tuples.
● Relation Instance: The set of tuples of a relation at a particular instance of time is called a relation
instance. Table 1 shows the relation instance of STUDENT at a particular time. It can change
whenever there is an insertion, deletion, or update in the database.
Important Terminologies
● Degree: The number of attributes in the relation is known as the degree of the relation. The STUDENT
relation defined above has degree 5.
● Cardinality: The number of tuples in a relation is known as cardinality. The STUDENT relation defined
above has cardinality 4.
● Column: The column represents the set of values for a particular attribute. The column ROLL_NO is
extracted from the relation STUDENT.
● NULL Values: The value which is not known or unavailable is called a NULL value. It is represented by
blank space. e.g.; PHONE of STUDENT having ROLL_NO 4 is NULL.
Types of Keys in Relational Model
● Candidate Key
● Primary Key
● Super Key
● Alternate Key
● Foreign Key
● Composite Key
SQL
● SQL stands for Structured Query Language and is a computer language that we use to interact with a
relational database.
● SQL is a tool for organizing, managing, and retrieving archived data from a computer database.
● The original name was given by IBM as Structured English Query Language, abbreviated by the acronym
SEQUEL.
● When data needs to be retrieved from a database, SQL is used to make the request. The DBMS processes the
SQL query, retrieves the requested data and returns it to us.

SQL Basics
Additional Links
● Database Schema in detail
● DBMS Interview Questions
● SQL Queries Interview Questions

You might also like