DBMS Note
DBMS Note
DATABASE ARCHITECTURE
Data: It is a collection or representation of facts, figures and statistics etc., which
does not have particular meaning. Data is in the form of numbers, characters,
symbols, pictures also.
Information: It is a processed data or collection of data which is having perfect
meaning.
• Data [raw facts]-> data Transformation->Information.
Database: Database is an organized collection of related data for one or more
purposes.
DBMS: DBMS stands for Database Management System
• A DBMS is a software that enables users to create, store, and maintain a
database.
•
Traditional File Processing System (TFS)
1. Each application keeps its own separate file for storing data, leading to data
duplication.
Merits/Advantages:
1. No need of highly technical person to handle the database.
2. Processing speed is high compared to the DBMS approach.
3. No need of external storage.
Let us take an Example of Hospital Management System.
Demerits/Disadvantages:
Each component maintains its own files to store relevant information.
1. Duplication of data: Redundancy
• Information is repeated in multiple files.
• For example, the doctor's details appear in the doctor's file, as well as in
the patient and ward files.
• This results in the same data being stored multiple times across different
files.
2. Data dependence:
Redundancy leads to data dependence, meaning that the information in one file
is dependent on the information in another file. For example, in the hospital
management system, without knowing the doctor’s details, it is difficult to
manage patient and ward files. This interdependence causes data to be closely
linked across files.
3. Data inconsistency:
Due to redundancy, data may become inconsistent, meaning that it is not ordered
or synchronized across different files.
4. Limited data sharing:
Each application has its own private files, limiting the opportunity for data
sharing between different applications.
5. Lack of security:
This approach does not have mechanisms to protect data from unauthorized
access. There is no way to verify the identity of users authorized to access specific
applications.
6. Lengthy development time:
Developing multiple applications in this system is time-consuming. It requires
significant effort and time to manage various files.
Data base Approach
In the database approach, data is stored in a single location, known as a repository,
and it is shared among many users.
As shown in the above figure the DBMS is central system which provides a
common interface between the data and end users.
Advantages
1. Minimum data redundancy:
database stores unique details for each user, so the same data doesn't have to be
duplicated in multiple places. This reduces the repetition of data.
2. Data Consistency:
Reduced data redundancy leads to better data consistency.
3. Data Sharing:
A database allows related data to be easily shared, such as doctors sharing patient
information with each other.
4. Data Independence:
Different data, like doctor and patient information, are stored separately, so they
don't depend on each other.
5. Data Integrity:
Databases provide better security and accuracy of data compared to traditional
file systems.
6. Easy Maintenance
Maintenance is simpler because all data is managed in a centralized system.
Disadvantages
1. Cost of hardware and software.
2. Need for external database.
3. Highly dependent on DBMS operation.
4. Need technical staff to handle database.
• In this model data will be represent in the form of inverted tree like
structure.
• This structure allows representing information using parent-child
relationship.
• Each parent can have many children. But each child has only one parent.
Hence, this relationship is called as one to many relationships
• This model is used to describe the data and maintain the logical and view
level
• At the top of the hierarchy, there is one entity, which is called the root.
ADVANTAGES:
• In this model DBMS provides lot of security.
• There is always link between the parent and child.
• Proper ordering of a tree result is easier and faster.
DISADVANTAGES:
• Although it is a simple to design but complex to implement.
• If you make any changes in the database structure then you must make
changes in the entire application in the DBMS.
• This model suffers from the insert, delete and update anomalies.
ADVANTAGES:
• Data must be tree like structure because of we are using the pointers.
• Data manipulation can be done easily.
• It is possible to represent many to many relationship
DISADVANTAGES:
• It is very complex to implement the pointer concept.
• It is very difficult to make the structural changes in the database.
Database Schema
Characteristics:
Categories of schema
1.Physical Schema:
2. Logical Schema:
3.View Schema:
• Single-User DBMS:
o Designed for use by a single user at a time.
o Example: Microsoft Access.
• Multi-User DBMS:
o Supports multiple users accessing the database simultaneously.
o Example: MySQL, Oracle.
• Centralized DBMS:
o The database is stored and managed in a single location, with all
users accessing it remotely.
• Distributed DBMS:
o The database is spread across multiple locations, with each site
maintaining its own DBMS instance.
Data independence
• It is the ability to change the schema at one level of the database system
without having to change the schema at the other levels.
• There are two types of data independence as follows:
DBMS Architecture
Two-Tier Architecture
3.External level
• It is the highest level of abstraction that deals with the user’s view of the
database and thus, is also known as view level.
• In general, most of the users and application programs do not require the
entire data stored in the database.
• It permits users to access data in a way that is customized according to
their needs, so that the same data can be seen by different users in
different ways, at the same time.
Database Languages
• A DBMS has appropriate languages and interfaces to express database
queries and updates.
• Database languages can be used to read, store and update the data in the
database.
DBMS Interfaces
• Interfaces are the programs which convert system language to user
understandable language; hence it is as same as the translator.
• The user-friendly interfaces provided by DBMS are :
1. Menu-Based Interface
• An interface where you navigate by choosing options from menus.
• Example: ATM Machine: When you use an ATM, you choose what you
want to do (e.g., withdraw money, check balance) from a series of menus.
2. Forms-Based Interface
• An interface where you fill out fields in a form to input or retrieve data.
• Example: Online Registration Form: When signing up for an online
service, you fill out a form with your name, email, and other details to
create an account.
•
3. Graphical User Interface (GUI)
• An interface that uses visual elements like buttons, icons, and windows
that you interact with, usually with a mouse or touchscreen.
• Example: Microsoft Windows: When you use a computer, you click on
icons, drag files, and interact with programs through buttons and windows.