Docsity

Dmbs_master_notes_<>, Slides of Computer Science

Partial preview of the text

Download Dmbs_master_notes_<> and more Slides Computer Science in PDF only on Docsity!

DBMS

UNIT 1

THEORY MASTER NOTES

Definition → Understanding → Keywords → Exam Answer

Complete exam-oriented theory, diagrams, definitions,

memory cues and question bank

n HOW TO USE THESE NOTES

These notes are designed to take you from first-reading to exam-ready in a structured way. Follow the learning sequence below for every topic:

Step 1 Learn the Definition Read the highlighted Definition Box first.

Step 2

Understand Easy Meaning Read the simple explanation to grasp the concept.

Step 3 Memorize Keywords Keywords in the green box are exam scoring points.

Step 4 Study Key Theory Bullet points give you structured exam content.

Step 5 Learn the Example Examples anchor abstract concepts to real situations.

Step 6 Practice the Diagram Redraw diagrams on paper until you can reproduce them.

Step 7

Memorize Exam Answer The exam answer is your model response template.

Step 8 Use Memory Cues Purple cues are last-minute triggers for your memory.

n EXAM ANSWER WRITING STRATEGY

QUESTION

↓ IDENTIFY TOPIC

↓ WRITE DEFINITION

↓ WRITE 3–5 KEY POINTS

↓ ADD DIAGRAM / TABLE

↓ END WITH EXAMPLE / CONCLUSION

n UNIT 1 — COMPLETE THEORY

1. File Processing System

n EXAM PRIORITY: VERY HIGH

n Definition

A File Processing System is a traditional data management system in which data is stored in

separate files and accessed through application programs.

n Easy Meaning

Before DBMS, each application maintained its own data files. As applications multiplied, the same data ended up in multiple places, making management difficult.

Application 1 → File 1 | Application 2 → File 2 | Application 3 → File 3

n Key Theory

  • New requirement → new application program had to be written.
  • New data files were created as per need.
  • Files created at different times may have different formats.
  • Different applications may be written in different programming languages.
  • The combination of many programs + separate files makes data management difficult.

n Keywords

Traditional system, separate files, application programs, data files, file format, data management

/n Example

In a bank: as the bank grew, each new service (loans, accounts, payroll) got its own program and files. Updating customer address meant updating it in every file separately.

n Exam Answer

Q: What is a File Processing System?

A: A File Processing System is a traditional data management system in which data is stored in separate files and accessed through application programs. As the number of applications and files increases, problems such as redundancy, inconsistency and data isolation arise.

n Memory Cue

n FILE SYSTEM = Separate Files + Separate Programs

2. Problems of File Processing System

n EXAM PRIORITY: VERY HIGH

The following six major problems of the traditional file processing system motivated the development of DBMS:

2.1. Data Redundancy and Data Inconsistency

n EXAM PRIORITY: VERY HIGH

n Definition

Data Redundancy means the same information is stored in multiple places. Data Inconsistency

occurs when different copies of the same data contain different values.

n Easy Meaning

Same data stored in File A, File B, File C. If File A is updated but File B is not → Inconsistency.

n Key Theory

  • Duplicate data storage wastes storage space.
  • Updating multiple copies is difficult.
  • Different copies can contain different values after partial updates.

n Keywords

Redundancy, duplication, multiple places, inconsistency, different versions, update

/n Example

Student address is stored in 3 different files. One file is updated; others still contain the old address.

n Exam Answer

Q: What are Data Redundancy and Data Inconsistency?

A: Data redundancy means storing the same data in more than one place. Data inconsistency occurs when different copies of the same data contain different values due to improper updating. These are major limitations of traditional file processing systems.

n Memory Cue

n Repeat Data → Redundancy

n Different Data → Inconsistency

2.2. Difficulty in Accessing Data

n EXAM PRIORITY: HIGH

n Definition

In a traditional file system, accessing required information may be difficult because the required

data may not have been planned or provided through an existing application program.

n Easy Meaning

Users sometimes need information that was not planned for. Then a new application program must be written, which takes time and effort.

2.4. Concurrency Problems / Multiple Users

n EXAM PRIORITY: VERY HIGH

n Definition

Concurrency Problem occurs when multiple users access or update the same data at the same

time and the system does not properly control these simultaneous operations.

n Easy Meaning

User A and User B both access the same bank account balance simultaneously. Without control, the final balance may become incorrect.

n Key Theory

  • Multiple users may access the system simultaneously.
  • The system must properly support multiple concurrent users.
  • Data must remain correct during simultaneous updates.
  • Without proper concurrency control, incorrect results may occur (e.g., wrong bank balance after simultaneous withdrawals).

n Keywords

Multiple users, simultaneous access, simultaneous update, concurrency, control

/n Example

Bank balance: User A withdraws n500, User B withdraws n300 at the same time. Without concurrency control, the final balance may reflect only one withdrawal.

n Exam Answer

Q: What is a concurrency problem?

A: A concurrency problem occurs when multiple users access or update the same data simultaneously. Without proper concurrency control, operations may interfere with each other and produce incorrect results.

n Memory Cue

n Many Users + Same Time = Concurrency

2.5. Security Issues

n EXAM PRIORITY: HIGH

n Definition

Database Security means controlling access to data so that only authorized users can view or

modify information.

n Easy Meaning

Not every user should see all the data. Payroll staff should see employee salary records but not all customer account details. File systems make such fine-grained access control difficult.

n Key Theory

  • Every user should not be allowed to access all data.
  • Different users require different access levels.
  • Unauthorized access must be prevented.
  • File processing systems make controlled security difficult to enforce.

n Keywords

Authorization, access control, authorized user, security, restricted data

n Exam Answer

Q: Explain security issues in traditional file systems.

A: In a traditional file processing system, it is difficult to provide controlled access to data. Not every user should be allowed to view or modify all data. Therefore, proper authorization and access control are required.

2.6. Integrity Issues

n EXAM PRIORITY: HIGH

n Definition

Data Integrity means maintaining the correctness, validity and consistency of data according to

defined rules or constraints called integrity constraints.

n Easy Meaning

Data being stored is not enough — data must be correct and follow rules. For example, an account balance should not go below a defined minimum. File systems cannot easily enforce such constraints.

n Key Theory

  • Data must follow defined correctness rules.
  • Rules are called integrity constraints.
  • File systems have no built-in mechanism to enforce integrity constraints.
  • Example: Account balance must not violate a defined rule (e.g., minimum balance).

n Keywords

Correctness, validity, consistency, integrity constraints, rules

n Exam Answer

Q: What is Data Integrity?

A: Data integrity refers to the correctness and consistency of data maintained according to defined rules called integrity constraints.

n Memory Cue

A Database Management System (DBMS) is a software system that allows users to define,

create, maintain, manipulate and control access to a database.

n Easy Meaning

DBMS is the software that sits between users and the database. It manages all data operations and enforces rules, security and recovery mechanisms.

n Key Theory

  • Manages data: stores and retrieves data efficiently.
  • Provides controlled access: different users see different data.
  • Supports data manipulation: insert, update, delete, query.
  • Maintains integrity: enforces data rules and constraints.
  • Supports multiple users simultaneously (concurrency control).
  • Provides security and authorization mechanisms.
  • Handles backup and recovery.

n Keywords

Software system, define, create, maintain, manipulate, control access, database, concurrency, security, recovery

/n Example

Examples: MySQL, Oracle, SQL Server, PostgreSQL.

n Exam Answer

Q: What is DBMS?

A: A Database Management System is a software system used to define, create, maintain and manipulate databases. It also controls access to data and provides facilities for secure and efficient data management, including concurrency control, backup and recovery.

n Memory Cue

n DBMS = Define + Create + Maintain + Manipulate + Control Access

5. Database vs DBMS

n EXAM PRIORITY: VERY HIGH

Basis Database DBMS Meaning Structured collection of related data Software system for managing data

Nature Data Management Software

Purpose Stores organized data Manages, accesses and controls data

Example Student records, Bank records MySQL, Oracle, SQL Server

n DATABASE = DATA

n DBMS = MANAGER OF DATA

6. Data Abstraction

n EXAM PRIORITY: VERY HIGH

n Definition

Data Abstraction is the process of hiding unnecessary details of data storage and showing

users only the information relevant to them.

n Easy Meaning

Database systems are complex. Data abstraction hides this complexity from users. Each user sees only what they need to see — not how or where data is physically stored.

n Key Theory

  • Users are provided an abstract view of the database.
  • Physical storage details are hidden from users.
  • Complexity of the underlying system is hidden.
  • Three levels of abstraction exist: Physical, Conceptual and View.

n Keywords

Hiding complexity, abstract view, storage details, three levels, physical, conceptual, view

n Exam Answer

Q: What is Data Abstraction? Explain its levels.

A: Data Abstraction is the process of hiding unnecessary data-storage details and presenting only relevant information to users. It has three levels: Physical Level (how data is stored), Conceptual Level (what data is stored and its relationships) and View Level (what a particular user sees).

n Memory Cue

n Physical = HOW

n Conceptual = WHAT + RELATIONSHIP

n View = WHAT A USER SEES

n Data Abstraction Levels Diagram

A data model defines the structure of a database — what data is stored, how data is related to other data, what data means, and what rules must be followed.

n Key Theory

  • Describes: data, relationships, meaning, rules and constraints.
  • Two main categories: Object-Based Logical Models and Record-Based Logical Models.
  • Object-Based: Entity-Relationship model, Object-Oriented model.
  • Record-Based: Relational, Network, Hierarchical models.

n Keywords

Data, relationships, meaning, constraints, object-based, record-based, relational, network, hierarchical

n Exam Answer

Q: What is a Data Model? Explain its types.

A: A Data Model is a collection of concepts used to describe data, relationships, the meaning of data and constraints. The two main categories are Object-Based Logical Models (e.g., ER Model) and Record-Based Logical Models (Relational, Network, Hierarchical).

n Memory Cue

n Data Model = Data + Relationships + Meaning + Constraints

n Data Model Classification

DATA MODELS

Object-Based Record-Based

Relational Model Network Model Hierarchical Model

8. Object-Based Logical Model

n EXAM PRIORITY: HIGH

n Definition

An Object-Based Logical Model represents data using objects and their relationships, providing

a higher-level description of the logical structure of a database.

n Easy Meaning

In this model, data is organized around objects rather than tables or records. Objects store both data and the operations that work on that data.

n Key Theory

  • Objects store data (attributes/properties).
  • Objects store operations (methods) that work on that data.
  • Classes group similar objects and act as blueprints.
  • Provides a higher-level view than record-based models.
  • Entity-Relationship model is an important object-based model.

n Keywords

Object, data, methods, class, blueprint, type, higher-level, logical structure

n Memory Cue

n OBJECT = DATA + METHODS

n CLASS = BLUEPRINT

9. Object

n EXAM PRIORITY: HIGH

n Definition

An Object is an entity-like software structure that contains data and operations (methods) that

work on that data.

n Easy Meaning

Think of an Object as a self-contained unit: it knows its data AND knows how to operate on it.

n Key Theory

  • An object contains data (attributes).
  • An object contains methods (operations) that act on that data.
  • Objects represent real-world entities in software.

n Keywords

Object, data, methods, operations, software structure, entity

/n Example

Bank Account Object: • Data: Account Number, Balance • Methods: Pay Interest, Withdraw, Deposit

n Diagram

n EXAM PRIORITY: HIGH

n Definition

A Record-Based Logical Model represents data using fixed-format records composed of a fixed

number of fields.

n Easy Meaning

In this model, the database is organized into records. Each record has a fixed format with a fixed number of fields. Three widely used types: Relational, Network and Hierarchical.

n Key Theory

  • Data is organized in fixed-format records.
  • Each record has a fixed number of fields.
  • Fields are usually fixed-length.
  • Three main types: Relational, Network, Hierarchical.

n Keywords

Record, field, fixed format, fixed-length, relational, network, hierarchical

n Memory Cue

n Record-Based = Fixed Records with Fixed Fields

12. Relational Model

n EXAM PRIORITY: VERY HIGH

n Definition

The Relational Model represents data in the form of tables (relations), where each table has

rows (records/tuples) and columns (attributes).

n Easy Meaning

Data is organized as tables. Each row represents one record. Each column represents one attribute. This is the most widely used database model today.

n Key Theory

  • Data is stored in tables (relations).
  • Each row (tuple) = one record.
  • Each column (attribute) = one property.
  • Tables can be related to each other using keys.

n Keywords

Tables, rows, tuples, columns, attributes, relations

/n Example

Student table: Roll No | Name | Course | Address Each row is one student record.

n Memory Cue

n RELATIONAL MODEL = TABLES

n Row = Record | Column = Attribute

13. Network Model

n EXAM PRIORITY: HIGH

n Definition

The Network Model represents data using a network-like (graph) structure in which records can

have multiple relationships with other records.

n Easy Meaning

Unlike the hierarchical model (tree), the network model allows more flexible many-to-many connections between records.

n Key Theory

  • Data is organized as a graph/network of records.
  • A record can have multiple parents (unlike hierarchical).
  • More flexible than the hierarchical model.
  • Relationships are represented as explicit links between records.

n Keywords

Network, graph, multiple relationships, records, links, many-to-many

n Memory Cue

n NETWORK = GRAPH-LIKE (Multiple connections)

14. Hierarchical Model

n EXAM PRIORITY: HIGH

n Definition

The Hierarchical Model organizes records in a tree structure where each child record has only

one parent.

n Easy Meaning

Data is arranged like a family tree. Each node has exactly one parent (except the root). Simple but inflexible — cannot represent many-to-many relationships.

n Key Theory

  • Data is organized in a tree structure.
  • Each child record has exactly one parent.

Q: What is an Entity?

A: An entity is a real-world object that can be identified separately in a database system.

n Memory Cue

n ENTITY = Real-world, identifiable, separate object

16. Entity Set

n EXAM PRIORITY: VERY HIGH

n Definition

An Entity Set is a collection of similar entities.

n Easy Meaning

Just as a single student is an entity, all students together form the Student Entity Set.

n Key Theory

  • A group of entities of the same type forms an entity set.
  • All entities in an entity set share the same attributes.
  • Example: All students in a university form the STUDENT entity set.

n Keywords

Collection, similar entities, group, entity set, same type

/n Example

Student 1, Student 2, Student 3 → STUDENT ENTITY SET

n Exam Answer

Q: What is an Entity Set?

A: An Entity Set is a collection of similar entities that share the same attributes.

n Memory Cue

n ONE = ENTITY

n GROUP of similar = ENTITY SET

17. Attribute

n EXAM PRIORITY: VERY HIGH

n Definition

An Attribute is a property or characteristic that describes an entity.

n Easy Meaning

Attributes are the details about an entity. A Student entity has attributes like Roll No, Name, Address and Course.

n Key Theory

  • Attributes describe properties of an entity.
  • Each entity has one or more attributes.
  • A Key Attribute uniquely identifies an entity.
  • Attributes are represented as ovals in ER diagrams.

n Keywords

Property, characteristic, describes entity, oval, ER diagram

/n Example

STUDENT entity: Roll No, Name, Address, Course — all are attributes.

n Memory Cue

n ENTITY = WHO / WHAT

n ATTRIBUTE = DETAILS ABOUT IT

18. Relationship

n EXAM PRIORITY: VERY HIGH

n Definition

A Relationship represents an association between two or more entities.

n Easy Meaning

When two entities are connected, that connection is a relationship. Example: STUDENT Enrolls in COURSE — 'Enrolls' is the relationship.

n Key Theory

  • A relationship defines how entities are associated.
  • Relationships are represented as diamonds in ER diagrams.
  • Relationships can have their own attributes.
  • Relationships have cardinality (1:1, 1:M, M:N).

n Keywords

Association, entities, connection, diamond, ER diagram, relationship

/n Example

STUDENT nn ENROLLS nn COURSE

n Memory Cue

n RELATIONSHIP = ASSOCIATION between entities