BBA II Yr (Sem IV) IT II Notes

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

1

Database Management System


Concept :
A database management system (DBMS) is system software for creating
and managing databases. A DBMS makes it possible for end users to create,
read, update and delete data in a database. The most prevalent type of data
management platform, the DBMS essentially serves as an interface between
databases and end users or application programs, ensuring that data is
consistently organized and remains easily accessible. A DBMS generally
manipulates the data itself, the data format, field names, record structure and
file structure.

In other words a database is collection of related data which represent some


aspects of the real world. A database system is designed to be build an
populated with data for a certain task

Component of DBMS :-
1. Hardware : Consists of a set of physical electronic devices such as
computers, I/O devices, storage devices, etc., this provides the interface
between computers and the real world systems. (You may write your
answer with expanding the above idea)

2. Software : This is the set of programs used to control and manage the
overall database. This includes the DBMS software itself, the Operating
System, the network software being used to share the data among users,
and the application programs used to access data in the DBMS. (You
may write your answer with expanding the above idea)

3. Data: DBMS exists to collect, store, process and access data, the most
important component. The database contains both the actual or

By Nilesh Raut
2

operational data and the metadata. (You may write your answer with
expanding the above idea)

4. Procedures : These are the instructions and rules that assist on how to
use the DBMS, and in designing and running the database, using
documented procedures, to guide the users that operate and manage it.
(You may write your answer with expanding the above idea)

5. Database Access Language: This is used to access the data to and from
the database, to enter new data, update existing data, or retrieve
required data from databases. The user writes a set of appropriate
commands in a database access language, submits these to the DBMS,
which then processes the data and generates and displays a set of
results into a user readable form. (You may write your answer with
expanding the above idea)

Features of DBMS :
 Minimum Duplication and Redundancy: Because there are many
users who use the database so chances of data duplicity are very high.
As in database management system, data files are shared that in turns
minimizes data duplication and redundancy. All the information in
database management system occurs only once so chances of duplicity
are very less.

 Anyone Can Work on It : Users who are not having any technical skills
can work on database management system. The query language
provided by DBMS is so easy to understand. If you want to update,
insert, delete and search any record then it is very easy with the help of
queries provided by DBMS. Any non programming user can do this
without any help of skilled programmer.

By Nilesh Raut
3

 Large Database Maintenance : Large databases of big companies can


be maintained only by database management system. These databases
require lots of security and other feature like backup and recovery. All
these features are contained in DBMS. It can maintain a database with
lots of data and information.

 Provides High Level of Security : Security is a very big concern for all
the organizations who are handling a large amount of data. DBMS
doesn’t give the full access of database except DBA or head of the
department. They are able to alter the database and all the users are
created by them so security level of DBMS becomes so high. No other
person or user can access the full database; all of them have restrictions
according to their work.

 Permanent Storage of Data : DBMS stores all the data files


permanently and there is no chance of any loss of data. If somehow the
data get lost then there is a backup and recovery method too that can
save organization’s data files. So no need to worry about data loss in
DBMS.

 Multi-user Access : In DBMS, multiple users can access all kind data
and information stored in one data store. There are certain limits that
users can access or view particular data according to the rights given to
them. This increases the security and privacy of data for users because
they will have their own interface to access data.

By Nilesh Raut
4

DATABASE MODEL :
 Hierarchical Model : This database model organizes data into a tree-
like-structure, with a single root, to which all the other data is linked.
The hierarchy starts from the Root data, and expands like a tree, adding
child nodes to the parent nodes.
In hierarchical model, data is organized into tree-like structure with one
one-to-many relationship between two different types of data, for
example, one department can have many courses, many professors and
of-course many students.

 Network Model : This is an extension of the Hierarchical model. In this


model data is organized more like a graph, and are allowed to have
more than one parent node. In this database model data is more related
as more relationships are established in this database model. Also, as
the data is more related, hence accessing the data is also easier and fast.
This database model was used to map many-to-many data relationships.

 Relational model : The relational model represents the database as a


collection of relations. A relation is nothing but a table of values. Every
row in the table represents a collection of related data values. These
rows in the table denote a real-world entity or relationship.

The table name and column names are helpful to interpret the meaning
of values in each row. The data are represented as a set of relations. In
the relational model, data are stored as tables. However, the physical
storage of the data is independent of the way the data are logically
organized.

By Nilesh Raut
5

DBMS LANGUAGE :-
1. DDL (Data Definition Language) : DDL stands
for Data Definition Language. It is used to define database structure or
pattern. It is used to create schema, tables, indexes, constraints, etc. in the
database. Using the DDL statements, you can create the skeleton of the
database. Data definition language is used to store the information of
metadata like the number of tables and schemas, their names, indexes,
columns in each table, constraints, etc.

2. DML (Data Manipulation Language) : Data Manipulation Language


(DML) is a language by which users access and manipulate data. Data
manipulation refers to retrieval, insertion, deletion and modification of
data or information stored in the database. The basic goal is to attain
efficient human interaction with the system. DML is just like simple
English language and is mostly used as a Structured Query Language (SQL)
for information retrieval and manipulation.

3. DCL(Data Control Language) : DCL stands for Data Control


Language.DCL is used to control user access in a database. This command
is related to the security issues. Using DCL command, it allows or restricts
the user from accessing data in database schema.

4. TCL(Transaction Control Language) : The Transaction


Control Language is used in conjunction with the Data Manipulation
Language to control the processing and exposure of changes. Transactions
are a fundamental part of how relational databases protect the
integrity and reliability of the data they hold. Transactions are
automatically used on all DDL and DML commands.

Database design :-
A properly designed database provides you with access to up-to-date,
accurate information. Because a correct design is essential to achieving
your goals in working with a database, investing the time required to learn
the principles of good design makes sense. In the end, you are much more

By Nilesh Raut
6

likely to end up with a database that meets your needs and can easily
accommodate change.

Steps :-
 Determining the purpose of your database : It is a good idea to write
down the purpose of the database on paper — its purpose, how you
expect to use it, and who will use it. For a small database for a home
based business, for example, you might write something simple like
"The customer database keeps a list of customer information for the
purpose of producing mailings and reports." If the database is more
complex or is used by many people, as often occurs in a corporate
setting, the purpose could easily be a paragraph or more and should
include when and how each person will use the database. The idea is to
have a well developed mission statement that can be referred to
throughout the design process. Having such a statement helps you focus
on your goals when you make decisions.

 Finding and organizing the required information : To find


and organize the information required, start with your existing
information. For example, you might record purchase orders in a ledger
or keep customer information on paper forms in a file cabinet. Gather
those documents and list each type of information shown (for example,
each box that you fill in on a form).

 Dividing the information into tables : To divide the information


into tables, choose the major entities, or subjects. Once you have
chosen the subject that is represented by a table, columns in that table
should store facts only about the subject. For instance, the product table
should store facts only about products. Because the supplier address is a
fact about the supplier, and not a fact about the product, it belongs in
the supplier table.

By Nilesh Raut
7

 Turning information items into columns : To determine the


columns in a table, decide what information you need to track about the
subject recorded in the table. Once you have determined the initial set of
columns for each table, you can further refine the columns.
1. Don’t include calculated data 
2. Store information in its smallest logical parts  

 Specifying primary keys : Each table should include a column or


set of columns that uniquely identifies each row stored in the table. This
is often a unique identification number, such as an employee ID number
or a serial number. In database terminology, this information is called
the primary key of the table. Access uses primary key fields to quickly
associate data from multiple tables and bring the data together for you

 Creating the table relationships : Now that you have divided your
information into tables, you need a way to bring the information
together again in meaningful ways.  In a relational database, you divide
your information into separate, subject-based tables. You then use table
relationships to bring the information together as needed.

 Applying the normalization rules : You can apply the data


normalization rules (sometimes just called normalization rules) as the
next step in your design. You use these rules to see if your tables are
structured correctly. The process of applying the rules to your database
design is called normalizing the database, or just normalization.

Normalization :-
Normalization is the process of organizing the data in the
database. Normalization is used to minimize the redundancy from a
relation or set of relations. It is also used to eliminate the undesirable

By Nilesh Raut
8

characteristics like Insertion, Update and Deletion Anomalies.


Normalization divides the larger table into the smaller table and links
them using relationship. The normal form is used to reduce redundancy
from the database table.

Anomalies in DBMS
There are three types of anomalies that occur when the database
is not normalized. These are – Insertion, update and deletion anomaly.

Insertion anomaly:  If a tuple is inserted in referencing relation and


referencing attribute value is not present in referenced attribute, it will
not allow inserting in referencing relation. For Example, If we try to
insert a record in STUDENT_COURSE with STUD_NO =7, it will not allow.

Deletion and Updation anomaly:  If a tuple is deleted or updated from


referenced relation and referenced attribute value is used by
referencing attribute in referencing relation, it will not allow deleting
the tuple from referenced relation. For Example, If we try to delete a
record from STUDENT with STUD_NO =1, it will not allow. To avoid this,
following can be used in query:

RDBMS
RDBMS stands for relational database management system. A relational
model can be represented as a table of rows and columns. Databases are
computerized systems that collect and store data so it can be cross-
referenced through links to related data within the collection as well as
related information in other databases. There are many purposes and
types of databases. Relational databases are among the most common.

By Nilesh Raut
9

Component
A relational database has following major components:
1. Table
2. Record or Tuple
3. Field or Column name or Attribute
4. Domain
5. Instance
6. Schema
7. Keys

1. Table
In a relational database, a table is the same as a record, which is the
fundamental data component. It is comprised of a set of fields that are
the same in every table or record, such as the name, address and
product of the customer. A table is a collection of data represented in
rows and columns. Each table has a name in database. For example, the
following table “STUDENT” stores the information of students in
database.

STUDENT_ID STUDENT_NAME STUDENT_ADD STUDENT_AGE


101 Nilesh Raut India 999
102 Rohan Kasbe Kazagisthan 1398
103 Samrat Bansode Bangladesh 17
104 Aditya Sherkhane Bangkok 00
105 Prasad Bachate Canada 20
106 Aftab Shaikh Malaysia 28
107 Omkar Palnge Shri-lanka 37
108 Komal Bangad Japan 229
109 Ayesha Momin Syria 49

By Nilesh Raut
10

2. Record or Tuple
Each row of a table is known as record. It is also known as tuple. For
example, the following row is a record that we have taken from the
above table.

104 Aditya Sherkhane Bangkok 00

3. Field or Column name or Attribute


The above table “STUDENT” has four fields (or attributes): Student_Id,
Student_Name, Student_Addr & Student_Age.

4. Domain
A domain is a set of permitted values for an attribute in table. 

5.Instance
The data stored in database at a particular moment of time is called
instance of database. Database schema defines the variable declarations
in tables that belong to a particular database; the value of these
variables at a moment of time is called the instance of that database.

6.Schemas
A database is a collection of interrelated data files or structures. It is
designed to meet the various information needs of the organization. Also, it
is integrated and shared. Thus, a relational database schema is
an arrangement of relation states in such a manner that every relational

By Nilesh Raut
11

database state fulfills the integrity constraints set on a relational database


schema.

7.keys
Key plays an important role in relational database; it is used for
identifying unique rows from table. It also establishes relationship
among tables.

Features of RDBMS
- Provides data to be stored in tables
- Persists data in the form of rows and columns
- Provides facility primary key, to uniquely identify the rows
- Creates indexes for quicker data retrieval
- Provides a virtual table creation in which sensitive data can be stored
and simplified query can be applied.(views)
- Sharing a common column in two or more tables(primary key and
foreign key)
- Provides multi user accessibility that can be controlled by individual
users.

By Nilesh Raut

You might also like