Class :10
Subject : IT 402
Chapter : 8
Introduction to Database Management System
1. Introduction to DBMS
• In the modern world, a huge amount of data is generated every second (bank
transactions, school records, hospital data, shopping, social media posts).
• Handling such large data with files is difficult → problems like data redundancy,
inconsistency, difficulty in retrieval, and security risks arise.
• To solve these issues, Database Management Systems (DBMS) were
developed.
Definition of DBMS
A Database Management System (DBMS) is system software that is used to
create, store, manage, and manipulate databases.
• It provides an interface between the user (or application) and the database.
• Without a DBMS, data would have to be stored in files manually, which is difficult
to manage when the data grows large.
Example in Daily Life:
• ATM machines use DBMS to fetch account details.
• Railway reservation systems store passenger records.
• Online shopping sites (Amazon, Flipkart) store orders, customers, and payments
in databases.
1
2. Data and Information
Data
• Data is raw, unorganized facts and figures that do not have meaning on their own.
• It can be in the form of numbers, text, images, audio, video, or symbols.
• Data is stored in a database before being processed.
Examples:
• 25, 50, 75 → Just numbers, no meaning
• "Rahul", "Class 10" → Just words
Information
• Information is processed, organized, or structured data that conveys meaning
and is useful for decision-making.
Examples:
• "Rahul scored 75 marks in Class 10 IT"
• "The average age of students in Class 10 is 15 years"
Difference Between Data and Information
Feature Data Information
Meaning Raw facts, unprocessed Processed, meaningful data
Example 101, 102, 103 "Roll numbers of Class 10 students"
Usefulness No direct use Useful for decision making
State Input Output
2
3. Databases and DBMS
Database
• A database is an organized collection of related data stored electronically so that it can
be easily accessed, managed, and updated.
• It allows easy insertion, deletion, updating, and retrieval of data.
Examples of Databases:
• School Database → Tables for students, teachers, exams, and fees.
• Hospital Database → Tables for patients, doctors, treatments, and bills.
DBMS (Database Management System)
• DBMS is software that controls databases.
• It acts as a bridge between users/applications and the physical data storage.
• It ensures data consistency, security, concurrency control, and recovery.
Functions of DBMS:
1. Data Definition – Allows creation and modification of database structure.
2. Data Manipulation – Insertion, updating, deletion, and retrieval of data.
3. Data Security – Prevents unauthorized access (via passwords, roles).
4. Concurrency Control – Allows multiple users to access data without conflict.
5. Backup and Recovery – Protects data against loss.
6. Data Integrity – Ensures accuracy and consistency of data.
Examples of DBMS: MySQL, MS Access, Oracle, SQL Server, PostgreSQL.
4. Data Models
• A data model is a way to describe the structure of data, the relationships
between data, and the rules that govern operations on the data.
3
• It acts like a blueprint for designing databases.
Types of Data Models
4.1 Hierarchical Data Model
• Data is arranged in a tree-like structure.
• Each parent node can have multiple children, but each child has only one
parent.
• Uses 1:N relationship (one-to-many).
Example
Advantages:
• Simple and easy to understand
• Fast retrieval if the path is known
4
Disadvantages:
• Very rigid, difficult to reorganize
• Cannot handle many-to-many relationships
4.2 Network Data Model
• Organizes data as a graph of nodes and edges.
• Each record can have multiple parents and children.
• Supports many-to-many relationships.
Example:
Advantages:
• Handles complex relationships better
• Flexible than hierarchical model
Disadvantages:
• More difficult to design and manage
• Requires special skills
5
4.3 Relational Data Model
• Data is stored in tables (relations).
• Each table has rows (records/tuples) and columns (fields/attributes).
• Relationships are established using keys (primary, foreign).
Advantages:
• Easy to use and understand
• Uses SQL for powerful queries
• Eliminates redundancy through normalization
Disadvantages:
• May become slower with very large data
• Needs more storage and hardware resources
5. Relational Database Model
• A Relational Database is based on the Relational Data Model.
• It organizes data in tables (relations) connected by keys.
Important Terms:
• Tuple: A row in a table
• Attribute: A column in a table
• Domain: Set of possible values for a column
• Primary Key: A field that uniquely identifies each record
• Foreign Key: A field that connects two tables
• Entity – It is a real world object about which information is to be stored in a
database.
• Table – A table is a collection of logically related records.
6
• Field or Columns or attributes – A field is the smallest entity in the database. A
collection of fields make a record, a collection of records make a table and a
collection of tables make a database.
• Data Values – Data values are the raw data represented in numeric, character or
Database Management System Using LibreOffice Writer notes 2023-24 149
alphanumeric
• Record or Row – The data values for all the fields related to a person or object is
called a record.
• Primary Key – A primary key or simply a key is a field that uniquely identifies a
row in a table.
• Relational Database – A relational database is a collection of related tables.
• Foreign Key – If a field or a combination of fields of one table can be used to
uniquely identify records of another table, then that particular field is known as
the foreign key.
• Candidate Key – All the field values that are eligible to be the primary key are the
candidate keys for that table. Such fields can neither be left blank nor can have
duplicate values.
• Alternate Key – Out of the candidate keys, one or two are made as primary keys.
The others are the alternate keys.
Example:
7
6. Objects of an RDBMS
In an RDBMS (Relational DBMS), the main database objects are:
1. Tables
o Store data in rows and columns.
o Example: Student Table.
2. Fields (Columns/Attributes)
o Define data type and nature of data.
o Example: Name (Text), Marks (Integer).
3. Records (Rows/Tuples)
o A single entry in the table.
o Example: (Dipak Kumar 555 06/04/2004 )
4. Keys
o Primary Key: Uniquely identifies records.
o Foreign Key: Establishes relationships between tables.
5. Queries
o Used to retrieve and manipulate data.
o Example:
o SELECT Name, Marks FROM Student WHERE Marks > 80;
6. Forms
o User interface for entering or editing data.
8
7. Reports
o Present data in a formatted way.
8. Relationships
o Connections between tables.
o Types:
▪ One-to-One (1:1) → One student has one library card
▪ One-to-Many (1:N) → One teacher teaches many students
▪ Many-to-Many (M:N) → Many students enrolled in many courses