Dbms-Unit1 Notes For Bca
Dbms-Unit1 Notes For Bca
SYLLABUS
UNIT – 1
WHAT IS DATABASE MANAGEMENT SYSTEM
DATA BASE :
The database is a collections 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;
EXAMPLES :
The college database organize the data about the admin, staff, students and
faculties etc.
DBMS :
Database Management Systems (DBMS) are software systems used to store, retrieve,
and run queries on data. A DBMS serves as an interface between an end-user and a
database, allowing users to create, read, update, and delete data in the database.
DBMS manage the data, the database engine, and the database schema, allowing for
data to be manipulated or extracted by users and other programs. This helps provide
data security, data integrity, concurrency, and also maintain the data consistency in
CASE OF MULTIPLE USERS.
EXAMPLES :
APPLICATIONS OF DBMS :
There are different fields where a database management system is utilized. Following are a few
applications which utilize the information base administration framework –
3. Banking –
Database the executive’s framework is utilized to store the exchange data of the client
in the information base.
4. Education Sector –
Presently, assessments are led online by numerous schools and colleges. They deal
with all assessment information through the data set administration framework
(DBMS). In spite of that understudy’s enlistments subtleties, grades, courses, expense,
participation, results, and so forth all the data is put away in the information base.
7. Broadcast communications –
Without DBMS any media transmission organization can’t think. The Database the
executive’s framework is fundamental for these organizations to store the call
subtleties and month to month postpaid bills in the information base.
8. Account –
The information base administration framework is utilized for putting away data about
deals, holding and acquisition of monetary instruments, for example, stocks and bonds
in a data set.
9. Online Shopping –
These days, web-based shopping has become a major pattern. Nobody needs to visit
the shop and burn through their time. Everybody needs to shop through web based
shopping sites, (for example, Amazon, Flipkart, Snapdeal) from home. So all the items
are sold and added uniquely with the assistance of the information base
administration framework (DBMS). Receipt charges, installments, buy data these are
finished with the assistance of DBMS.
11. Manufacturing –
Manufacturing organizations make various kinds of items and deal them consistently.
To keep the data about their items like bills, acquisition of the item, amount, inventory
network the executives, information base administration framework (DBMS) is
utilized.
Before DBMS , was invented information was stored using file processing system.
File Processing System (FPS) is a way of storing, retrieving and manipulating data
which is present in various files.
Files are used to store various documents. All files are grouped based on their
categories. The file names are very related to each other and arranged properly to
easily access the files.
In file processing system, if one needs to insert, delete, modify, store or update
data, one must know the entire hierarchy of the files.
EXAMPLES:
CHARACTERISTICS OF DBMS
1. Duplicate Data
Data is stored more than once in different files, that means duplicate data
may occur in all these files. Since all the files are independent on each
other so it is very difficult to overcome this error and if anyone finds this
error then it will take time and effort to solve this issue.
For Example: If you change student name in library then his name should be
changed in all the departments related to the student.
3. Accessing Anomalies
Accessing anomalies means that it is not easy to access data in a desired or
efficient way. It makes supervision of department very difficult. If a user
wants information in a specific manner then he requires creating a program
for it.
For Example: Let’s say , if admin of the college wants any student
information like his name, fathers name, roll number, marks and class then
program for it is written but if he wants records of whose students whose
numbers are more than 80 percent then he require to create a different
program for it.
6. Atomicity Problem
Atomicity is required to save the data values, it means that information is
completely entered or canceled at all. Any system may fail at any time and
at that time it is desired that data should be in a consistent state.
For Example: If you are buying a ticket from railway and you are in the
process of money transaction. Suddenly, your internet got disconnected
then you may or may not have paid for the ticket. If you have paid then
your ticket will be booked and if not then you will not be charged anything.
That is called consistent state, means you have paid or not. Same atomicity
is not present in File Processing System.
8. Data Isolation
Data is isolated in File Processing System and data is stored in different
files. These files can be in different formats. If you want to extract data
from two file then you are required to which part of the file is needed and
how they are related to each other.
But still in spite of so many disadvantages, File Processing System is still
good for small organizations because it does not require costly softwares
and programmers to handle it.
7.Data security –
A file system provides a password mechanism to protect the database but
how longer can the password be protected?No one can guarantee that. This
doesn’t happen in the case of DBMS. DBMS has specialized features that
help provide shielding to its data.
DIFFERENCE BETWEEN DBMS VS FILE PROCESSING TEST :
VIEWS OF DATA :
Views of data refer to the different ways to show the database management
system to the user hiding its complexity.
Types:
1. Data abstraction
2. Instance and schema
3. Data independence
4. Data models
DATA ABSTRACTION :
DBMS INSTANCE:
DBMS SCHEMA :
For example: In the following diagram, we have a schema that shows the
relationship between three tables: Course, Student and Section. The diagram only
shows the design of the database, it doesn’t show the data present in those tables.
Schema is only a structural view(design) of a database as shown in the diagram
below.
The design of a database at physical level is called physical schema, how the
data stored in blocks of storage is described at this level.
Design of database at logical level is called logical schema, programmers and
database administrators work at this level, at this level data can be
described as certain types of data records gets stored in data structures,
however the internal details such as implementation of data structure is
hidden at this level (available at physical level).
Design of database at view level is called view schema. This generally
describes end user interaction with database systems.
Create
The main use of create command is to create a new table in database. It has a
predefined syntax in which we specify the columns and their respective data types.
syntax
CREATE TABLE <TABLE NAME>
( <COLUMN NAME> <DATA TYPE>,
<COLUMN NAME> <DATA TYPE>,
<COLUMN NAME> <DATA TYPE>,
<COLUMN NAME> <DATA TYPE>
);
Example
Create a student table with columns student name and roll number.
Alter
An existing database object can be modified using the alter command. Alter
command can do following changes to any table-
Drop
This command can delete an index, table or view. Basically, any component from a
relational database management system can be removed using the Drop command.
Once the object is dropped, it cannot be reused.
Truncate
Using the truncate command, all the records in a database are deleted, but the
database structure is maintained.
syntax
TRUNCATE TABLE <table name>
Comment
This command is used to add comments to the data dictionary.
syntax
DATABASE ARCHITECTURE :
A Database Management system is not always directly available for users and
applications to access and store data in it. A Database Management system can
be centralised(all the data stored at one location), decentralised(multiple copies of
database at different locations) or hierarchical, depending upon its architecture.
IT TYPES :
Advantage—
Fast for a single user because communication with another system is not
necessary.
Disadvantage—
Completely unscalable. Only one user can access the system at a given
time via the local client.
Advantages:
For example
we have a need to save the employee details in database. The two tiers of
two-tier architecture is
So, in client application the client writes the program for saving the record
in SQL Server and thereby saving the data in the database.
The Application layer resides between the user and the DBMS, which is
responsible to communicate the user's request to the database
management system and then send the response from the DBMS to the
user.
The application layer(business logic layer) also processes functional
logic, constraint, and rules before passing data to the user or down to
the DBMS.
Advantages
Three-tier architecture
Two-tier architecture consists consists of three layers :
of two layers : Client Tier and Client Layer, Business Layer
3 Database (Data Tier). and Data Layer.
DATA INDEPENDENCE;