0% found this document useful (0 votes)
4 views

DBMS-Intro

A database is an organized collection of data stored in tables, with entities representing different types of information such as students and teachers. A Database Management System (DBMS) facilitates data storage, retrieval, and management, ensuring data consistency and reducing redundancy. DBMS tools help users interact with the database efficiently, addressing issues found in traditional file systems.

Uploaded by

zoyaa.aazmi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

DBMS-Intro

A database is an organized collection of data stored in tables, with entities representing different types of information such as students and teachers. A Database Management System (DBMS) facilitates data storage, retrieval, and management, ensuring data consistency and reducing redundancy. DBMS tools help users interact with the database efficiently, addressing issues found in traditional file systems.

Uploaded by

zoyaa.aazmi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

A database is

defined as an
Database
organized collection
OrganizeD: Data is stored in a well-structured format — usually
of data in tables, with rows and columns .

(information) about Student_ID


101
Name
Aisha
Grade
A
102 Rahul B
an entity
(something that
exists) or things entity: An entity is anything about which data can be stored in a
database. Each entity becomes a table.
inFOrMatiOn: Processed or Entity Attributes (Fields) Example
meaningful output from raw Student Student_ID, Name, Class, Grade
data. Teacher Teacher_ID, Name, Subject, Contact_No
Book Book_ID, Title, Author, Year

Raw data: "85, 90, 78"


Information: "The average score
is 84.3"
Key PrOPerties OF a
Database

Integrated: Combines data from Shared


different sources into one unified •Meaning: Allows multiple users
system. and applications to access and use
•Example: A school database the same database.
integrates: •Example:
• Student records • Teachers enter grades
• Teacher details • Students check their results
• Class schedules • Admins manage student data
• Exam results
User ⇄ Application ⇄ DBMS ⇄ Database

•User: A person interacting with the system.


•Application: A software program the user uses (e.g., school
management software).
•DBMS: The system that handles data operations (like MySQL,
Oracle, etc.).
•Database: Where the actual data is stored.
.

File OrganizatiOn in
DbMs
Data/CharaCter
File
•Smallest unit of file organization.
•A collection of related records (like all
•Example: S, o, n, i, a (characters in the name
students in a class).
"Sonia").
•Also called a relation or table.
FielD / Data iteM •Example: The table Student holds many
•A set of characters representing one specific detail. records like Sonia’s
•Example:
•Roll Number = 20 Database
•Name = Sonia •A collection of related files.
•Age = 14 •Highest level of data organization.
•Marks = 90 •Example: A School Database may include
files/tables like:
reCOrD •Student
•A collection of fields. •Teacher
•One record = all data for one person or item. •Class
•Example: A student record → 20, Sonia, 14, 90 •Result
real-liFe Use Cases OF
Databases
aPPliCatiOn Data stOreD
Banking Account details, loans, transactions
Crop Loan Farmer data, land info, loan history
Inventory Management Product & delivery details
Organization Resource
Employee and department data
Management
Online Shopping User preferences, item descriptions
rOle OF a Database
ManageMent systeM (DbMs)

Examples of DBMS Software:


a DbMs is sOFtware that
•MS Access
helPs:
•MySQL
•Store data
•PostgreSQL
•Organize data
•SQLite
•Access and manage data efficiently
•Oracle
•SAP
•FoxPro, etc.
what a DbMs DOes??
it hanDles:
•Data storage – Saves data in structured formats (tables).
•Data retrieval – Allows searching and fetching of specific data.
•Administration – Manages how data is accessed and by whom.
•Reports – Generates summaries of data.
•Queries – Lets users ask questions (like “show all students with grade
A”).
•Data security – Ensures only authorized people can access or change
data.
It acts as a bridge between raw data and software applications that use the
data based on business rules.
what DbMs tOOls Can DO:

1.Store data in a structured way


2.Query the database (ask questions)
3.Sort and update data
4.Validate data and check for errors
5.Create reports
6.Keep data consistent, even with many users
neeD FOr DbMs:

PrObleMs in traDitiOnal File systeMs:


•Data redundancy: Same data stored multiple times
•Data inconsistency: One file gets updated, others don’t cause errors
hOw DbMs sOlves it:
•Centralized data → all applications access the same version
•Changes in one place → reflect everywhere
•Controls data duplication and inconsistency
Problems:
withOUt DbMs (OlD way – File systeM): •Data Redundancy: "Aisha" is stored
Imagine a school where: separately in 3 files.
•The teacher keeps student names in one Excel file. •Inconsistency: Aisha’s name is updated
•The accountant keeps fee details in another file. in the fee file but not in others.
•The librarian keeps book issues in a third file. •Difficult to Manage: It’s hard to
combine or update all data quickly.
Benefits:
With DBMS (Modern Way) •No redundancy: Aisha’s data is entered once
Now the school uses a DBMS like MySQL or MS Access. and used everywhere.
All data is stored in one centralized system: •Consistency: Updating her name updates it in
all linked places.
•One Student table holds names, roll numbers, grades. •Faster Access: Any teacher can search for her
•One Fee table links to the student’s ID. data easily.
•One Library table links book records to the same student. •Security: Only authorized staff can access
certain tables (e.g., fees or marks).
hOsPital Database
ManageMent systeM (DbMs)
Entity
Details (Fields/Columns)
(Table)
Appointment_ID Patient_ID Doctor_ID Date Time
Patient Patient_ID, Name, Age, Gender, Address, Contact A001 P001 D001 2025-05-12 10 AM
Doctor Doctor_ID, Name, Specialty, Contact, Availability A002 P002 D002 2025-05-13 11 AM
Appointm
Appointment_ID, Patient_ID, Doctor_ID, Date, Time
ent
Treatment_ID, Patient_ID, Doctor_ID, Diagnosis,
Treatment
Medicine, Cost Function Example
Billing Bill_ID, Patient_ID, Total_Amount, Payment_Status All patient and doctor records are stored in a
Lab Data Storage
Report_ID, Patient_ID, Test_Type, Result, Date structured way (tables)
Reports Data Quickly search for a patient's history or upcoming
Retrieval appointments
Patient_ID Name Age Gender Contact Only authorized staff can access sensitive patient
Data Security
P001 Anjali 35 Female 9876543210 data
P002 Ramesh 42 Male 9123456789 Avoid Patient’s name, ID, and address are stored once
Redundancy and used in billing, lab, appointments
Data If a patient changes address, it updates
Consistency everywhere
Report Monthly report showing number of surgeries, or
Generation billing summary
ASSIGNMENT-Online Shopping
 Without DBMS
 With DBMS
 Benefits of DBMS in Online
Shopping
 Any two-entity table
neeD FOr DbMs
Problems in Traditional Data System

Data inCOnsistenCy
Data reDUnDanCy •Definition: When one copy of the
Same data is stored in multiple places. data is updated but others are not.
•Example: A customer’s name and •Example: A student’s phone number
address are stored separately in the is changed in the fee file, but still
billing system, order file, and delivery log. shows the old number in the exam
records.
neeD FOr DbMs

How DBMS Solves These Problems


PrObleM DbMs sOlUtiOn

Stores data in a centralized database. One record


Redundancy
is used by all systems.

All updates are made in one place and are


Inconsistency
reflected everywhere.

Minimizes storing the same data repeatedly by


Duplication
using relationships between tables.
COMPOnents OF a Database
systeM
Users
Different people interact with the database system:
•DBAs (Database Administrators): Manage and maintain the database.
•Developers: Build applications that use the database.
•End-users: Use applications to access and work with data.
Database aPPliCatiOns
These are software programs that help users interact with the database.
•Can be personal, departmental, or commercial.
•May be general-purpose (like MS Access) or customized.
Database ManageMent systeM (DbMs)
Software that handles all operations related to databases:
•Creates and defines databases. Examples: MySQL,
•Maintains data by allowing updates and deletions. Oracle
•Processes queries to retrieve information.
Database
A structured collection of logically related data.
•Stores data in an organized format for easy access and management.
aDvantages OF DbMs

1.Data Consistency
• Ensures that all users see the same updated data.
• If data is changed in one place, it's automatically updated everywhere.
• Maintains uniform and accurate data across the system.

2.Control of Data Redundancy


•DBMS avoids unnecessary duplication of data.
• Repeated copies waste storage and cause inconsistencies.
•It integrates data so the same info isn't stored multiple times.

3. Sharing of Data
•Multiple users and applications can access and use the same data.
• Avoids the need to create separate copies for different users.
aDvantages OF DbMs
4.Reduced Programming Effort
•Easier and less coding needed for managing data.
• Developers don’t need to write complex programs to handle basic data tasks.
•Simplifies query processing, updates, and data manipulation.

5.Improved Data Integrity


•Ensures data entered is accurate and valid.
•Prevents incorrect data from being stored.
•Built-in checks help maintain accuracy.

6.Database Enforces Standards


•Maintains uniform formats and rules for data storage and access.
•Ensures consistency in how data is handled across the organization.
•The Database Administrator (DBA) can enforce rules easily.
aDvantages OF DbMs
7.Privacy and Security
•Protects data from unauthorized access.
•Access can be restricted to authorized users only.

8.Economical
•Reduces costs by centralizing data and reducing duplication.
•Saves money on storage, processing, and maintenance.
•More efficient resource usage.

9.Improved Backup and Recovery System


•Provides tools to recover data after failures.
•Prevents data loss from hardware/software issues.
•Automated backups and recovery processes.

10.Solving Enterprise Requirement, not Individual Requirement


•Designed to serve organizational needs, not just individual users.
•Large systems must support users with different technical skills.
Data abstarCtiOn

Data Abstraction is the process of hiding the complex details of how data
is stored and organized and presenting only the essential features to the user.In
simpler way, Users interact with data at a higher level without worrying
about how it's stored, accessed, or managed.

Example:??
levels OF Data abstraCtiOn
Data abstraction typically involves three levels:
1.Physical Level: How data is physically stored (in memory, on disk).
2.Logical Level: What data is stored and how it is organized (tables, relationships).
3.View Level: The user's specific perspective of the data, which may only show part
of the data.
Example: Google Maps
•View Level: When you open Google Maps, you see a map with your location and nearby
places like restaurants or routes. This is what you need to see to navigate, and you don’t see
all the extra details.
•Logical Level: Google Maps organizes data like addresses and routes in a database, but
you don’t need to know how it’s organized or structured.
•Physical Level: Google Maps uses servers and storage to store all the maps and location
data. You don’t see or need to know about how this is managed.
Data inDePenDenCe

Data independence means you can change the database at one level
without affecting other levels. This makes databases easier to maintain,
update, and scale.

Types of Data Independence:


1.Logical Independence
2.Physical Independence
lOgiCal/COnCePtUal
inDePenDenCe

We can change the database structure (like tables or relationships) without


changing how users interact with the data.

Online shopping system.


•Initially, the Customers table has columns: Customer _ID, Name, Email.
•Later, the company wants to add Phone Number to the table.
•Customers using the website or app to browse or place orders don’t need to
change anything—they still see the same experience.
This is logical data independence.
PhysiCal inDePenDenCe

We can change how data is stored on hardware without changing the


structure of the database (tables, columns, etc.).

A hospital database stores patient records.


Initially, records are stored on a hard drive.
Later, the hospital switches to a cloud storage system or faster SSDs.
Doctors and staff still use the same forms and screens to access patient data—
they don’t know or care where the data is physically stored.
This is physical data independence.

You might also like