NOTES
CLASS 11
SUBJECT
-
INFORMATICS PRACTICES
CHAPTER – 7 DATABASE CONCEPTS
1. Introduction to Databases
Database: A collection of related data organized in a way that it can be
easilyaccessed, managed, and updated.
Data: Raw facts and figures that are processed to produce meaningful
information.
Information: Processed data that is meaningful and useful for decision-
making.
2. Database Management System (DBMS)
DBMS: A software system designed to manage databases. It provides a
systematicway of storing, retrieving, and managing data.
Key functions of a DBMS include:
o Data definition
o Data retrieval
o Data manipulation
o Data security
3. Components of DBMS
DBMS Software: The software used to manage the database
(e.g., Oracle, MySQL,SQL Server).
Database Engine: The core service for accessing and processing data stored in
adatabase.
Database Schema: Defines the logical structure of the data,
including tables,columns, and relationships between them.
Query Processor: Analyzes and executes database queries.
Data Dictionary: Stores metadata (information about the structure of the data).
User Interface: Allows users to interact with the DBMS.
. Types of Database Models
Hierarchical Model: Data is organized in a tree-like structure with a parent-
childrelationship.
Network Model: Similar to the hierarchical model but allows multiple parent-
childrelationships.
Relational Model: Data is stored in tables (relations) that are linked through
keys.
Object-oriented Model: Data is represented as objects, similar to object-
orientedprogramming.
5. Relational Database Concepts
Table: A collection of related data organized in rows and columns.
Row (Record): A single, data entry in a table, representing an entity.
Column (Field): Represents an attribute of the entity.
Primary Key: A unique identifier for each record in a table.
Foreign Key: A field in a table that uniquely identifies a row in another table.
6. DBMS Languages
Data Definition Language (DDL) : Used to define the structure of the
database (tables,views, schemas)
Data Manipulation Language (DML) : Used for managing and manipulating
datawithin the database (e.g., SELECT, INSERT, UPDATE, DELETE).
Data Control Language (DCL) : Used to control access to data (e.g., GRANT,
REVOKE).
7. Types of Databases
Flat File Database : A simple database where data is stored in a single table
(e.g., CSVfiles).
Relational Database : A more complex database where data is stored in
multipletables, with relationships between them.
8. Advantages of Using a DBMS
Data Redundancy Reduction : Minimizes the duplication of data by sharing
dataacross applications.
Data Integrity : Ensures that the data is accurate and consistent.
Data Security : Protects data from unauthorized access.
Concurrency Control : Allows multiple users to access the database
simultaneouslywithout affecting data integrity.
Backup and Recovery: Provides mechanisms for data backup and recovery in
case of failure.
9. Database Design Process
Requirements Analysis: Understanding the data needs and defining the scope
of thedatabase.
Conceptual Design: Defining the data model and relationships.
Logical Design: Converting the conceptual model into a logical model (e.g.,
relational tables).
Physical Design: Determining the physical storage of the database.
10. ER Model (Entity-Relationship Model)
Entity: An object or thing in the real world that is distinguishable from other
objects(e.g., student, book).
Attribute: A property or characteristic of an entity (e.g., student’s name,
book’sprice).
Relationship: Describes how two entities are related (e.g., a student enrolls in a
course).
11. Normalization
Normalization : The process of organizing data to eliminate redundancy and
dependency.
o It involves dividing large tables into smaller, manageable ones and defining
relationships between them.
o First Normal Form (1NF): Ensures each column contains atomic values (no
repeating groups).
o Second Normal Form (2NF): Achieves 1NF and ensures all non-key
attributes are fully functionally dependent on the primary key.
o Third Normal Form (3NF): Achieves 2NF and ensures there are no transitive
dependencies between non-key attributes.
12. Data Independence
Logical Data Independence : The ability to change the logical schema without
changing the external schema (user views).
Physical Data Independence : The ability to change the physical schema
without affecting the logical schema
13. Key Constraints
Primary Key Constraint : Ensures that each record in a table is uniquely
identified.
Unique Key Constraint : Ensures that no two records have the same value for
the specified column(s).
Not Null Constraint : Ensures that a column cannot have a null value.
Check Constraint : Ensures that a value in a column meets a specific
condition.
Default Constraint : Provides a default value for a column when no value is
specified.
14. Transaction Management
Transaction : A sequence of operations performed as a single unit of work.
ACID Properties:
o Atomicity: Ensures that a transaction is fully completed or fully rolled back.
o Consistency: Ensures that a transaction moves the database from one
consistent state to another.
o Isolation: Ensures that concurrent transactions do not interfere with eachother.
o Durability : Ensures that once a transaction is committed, its changes are
permanent