dbms1 ppt
dbms1 ppt
DATABASE
MANAGEMENT SYSTEM
DATA & INFORMATION 2
What is Data?
Definition: Known facts or figures with implicit
meaning, representing facts, concepts, or instructions
in a formal manner for understanding and
processing.
Representation: Can be in alphabets, digits, and
special characters (e.g., "25", "ajit").
Information:
Definition: Processed data used for decision-making,
organized and classified to provide meaningful
values.
Example: "The age of Ravi is 25."
3
File:
Definition: A collection of related data stored in
secondary memory.
File-Oriented Approach:
Traditional Method: Each application has a separate
master file and personal files, with program
dependency on the files and vice versa.
Disadvantages of File- 4
Oriented Approach:
Data Redundancy and Inconsistency: Same information in multiple
files, leading to higher storage costs and data inconsistency.
Difficulty in Accessing Data: Conventional systems do not allow
convenient data retrieval based on user preference.
Data Isolation: Scattered data in various files with different formats
makes data retrieval difficult.
Integrity Problems: Difficulty in enforcing new constraints due to
changes in the application program.
Atomicity: Challenges in ensuring all or none operations in a
transaction due to system failures.
Concurrent Access: Not possible to access the same file
simultaneously for transactions.
Security Problems: Lack of security measures to protect data from
unauthorized access.
DATABASE 5
System (DBMS)
Definition: A collection of related data managed by programs
for defining, creating, maintaining, and manipulating a
database.
Functions of DBMS:
Defining Database Schema: Allows specifying the structure and
access rights for users.
Manipulation of Database: Includes inserting, updating, deleting,
and retrieving data.
Sharing Database: Facilitates consistent data sharing among
multiple users.
Protection of Database: Ensures protection against unauthorized
access.
Database Recovery: Supports recovery in case of system failures.
Advantages of DBMS 8
Hides the
complexity of
the database
system,
presenting only
necessary
details to users
or applications.
Levels of Abstraction 12
•Physical Level (Storage Level):
1. Deals with the actual storage of data on hardware.
2. Includes file structures, indexing, access methods, and
data retrieval/storage optimization.
•Conceptual Level (Logical Level):
1. Provides a unified view of the database, focusing on the
logical structure of data.
2. Involves schema design, tables, relationships,
constraints, and views.
•External Level (View Level):
•Description: Concerned with how data is presented to
individual users or applications.
•Details: Includes user-specific views and access controls.
Benefits of Data 13
Abstraction
Simplified Interaction: Users can interact
with a simplified view of data without
complex storage details.
Data Independence: Changes in storage
or schema do not affect user interaction.
Enhanced Security: Controls visibility and
access at the external level, protecting
sensitive information.
Data Independence 14
Ability
to change
the database
schema/structure
at one level
without affecting
other levels or
applications.
Types of Data
15
Independence
•Logical Data Independence:
Change the conceptual schema without altering external schemas or
applications.
•Implications:
•Changes to Logical Schema: Modify schema without impacting user
access.
•Minimal Impact: Applications/views remain unaffected if logical
structure isn’t altered.
•Example: Adding a new column to a table without affecting existing
applications.
•Physical Data Independence:
•Definition: Change physical storage without impacting the conceptual
schema or applications.
•Implications:
•Changes to Storage: Reorganize storage methods without affecting
the logical schema or user access.
•Flexibility: DBMS can optimize performance without disrupting
applications.
•Example: Switching from a B-tree index to a hash index without affecting
Benefits of Data 16
Independence
•Flexibility and Adaptability: Easier updates
and maintenance with minimal disruption.
Data
Item: The smallest unit of data
meaningful to users (e.g., "e101", "sumit").
Entities and Attributes:
Entity:Distinguishable objects in the real world
(e.g., Bank, Employee, Student).
Attributes:
Properties of entities (e.g.,
Empcode, Ename, Roll No, Name).
Database Administration 19
Language)
•DML commands are used to manipulate data in the
database.
•Includes SQL commands for inserting, updating, deleting,
and retrieving data.
•Purpose of DML:
•Manages data access and modifications.
•Used for day-to-day database operations like adding,
updating, or querying records.
DML commands 27
DCL (Data Control 28
Language)
DCL includes commands such as GRANT and
REVOKE which mainly deal with the rights,
permissions, and other controls of the
database system.
DCL commands 29
TCL (Transaction Control 30
Language)
•TCL commands manage transactions within a database.
•Transactions group multiple tasks into a single execution
unit.
Purpose of TCL:
•Data stored as
objects, similar
to object-
oriented
programming.
Hierarchical Database 41
Architecture
1-Tier Architecture 45
ADVANTAGE
DIS ADVANTAGE
Enhanced scalability
Increased complexity
Data Integrity
Security
Three schema Architecture 53
DATA MODELS
DATA MODELS
55
•Concept of tools that are developed to summarize the description of the database
•Defines how the logical structure of a database is modeled
•Data Model refers to the modeling of data description, data semantics, and consistency
constraints.
•A Data Model is collection of conceptual tools for describing :
Data
Data Relationships
Data Semantics
Consistency constraints
It provides a structured way to define how data is stored, organized, and manipulated.
•A conceptual tool that helps in the design and representation of databases.
•Used to specify the logical structure of a database, including data types, relationships, and
rules.
•Helps to ensure data consistency by defining constraints and relationships.
•Describes data at various levels of abstraction—physical, logical, and conceptual.
•Facilitates communication between developers, database designers, and users.
56
The Attributes like Name, Job of Employee and the Methods which will be
Constraints:
Constraints are rules applied to
database columns to enforce Integrity Constraints:
data integrity and consistency.
They ensure that the data Integrity constraints are a subset
entered into the database of constraints that specifically
adheres to specified rules. deal with maintaining the
accuracy and consistency of
Types: Include various types of data within a database. They
constraints such as primary focus on the integrity of the
keys, foreign keys, unique data.
constraints, and check
constraints. Purpose: To ensure that the
data adheres to certain
Primary Key, Foreign Key, conditions that maintain the
Unique Constraint, Not Null, correctness and consistency
Check, Default of the database. They are
essential for ensuring that
relationships between data
elements are preserved.
Integrity Constraints 81
Constraints
Domain Constraints 83
21CSE103 Mukesh 20
Entity Integrity Constraints 85
Mukesh 5th 20
Key Constraints 86
Keys are the entity set that are used to identify an entity within
its entity set uniquely. An entity set can contain multiple keys, bit
out of them one key will be primary key. A primary key is always
unique, it does not contain any null value in table.