Chapter at a glance
This chapter introduces students to the fundamental concepts of Database Management Systems (DBMS), covering data vs. information, database components, different database models, normalization techniques, and essential security measures. It aims to provide a comprehensive understanding of how data is organized, managed, and protected.
- Data vs. Information
- Database Management System (DBMS)
- Database Models (Hierarchical, Network, Relational)
- Database Objects (Tables, Queries, Forms, Reports)
- Keys (Primary, Foreign, Candidate)
- Data Definition Language (DDL) and Data Manipulation Language (DML)
- Database Normalization (1NF, 2NF, 3NF)
- Database Security (Authentication, Authorization, Encryption)
Exam focus: Students should focus on understanding the definitions, differences between concepts (like DDL vs. DML, centralized vs. distributed), the purpose and application of normalization, and the core principles of database security.
Key formulas and definitions
- Data: Raw, unprocessed facts and figures.
- Information: Processed, organized, and meaningful data.
- Primary Key: Unique and NOT NULL identifier for a record.
- Foreign Key: References a Primary Key in another table, can be duplicate and NULL.
- Normalization: Process to reduce redundancy and anomalies in a database.
On this page (17 sections)
- Multiple Choice Questions
- Short Answer Questions
- Q.1Define data and database along with examples.
- Q.2Define DBMS. Write its advantages and disadvantages.
- Q.3What is a database object? Explain shortly.
- Q.4What is a key in DBMS? Write the importance of primary key in a database.
- Q.5Write the difference between DDL and DML.
- Q.6What is a database model? Explain the different database models shortly.
- Q.7What is data normalization? Explain the different types of data normalization shortly.
- Q.8Write the difference between centralized and distributed databases.
- Q.9What is database security? Explain it.
- Q.10Study the tables given below and apply the normalization rules on them.
- Long / Descriptive Answer Questions
- Q.11What is a database? What are the different elements of a database? Explain them.
- Q.12Explain the different network models.
- Q.13What is data normalization? Explain the normalization rules with examples.
- Q.14What is database security? How is a database made secure?
Solutions and answers
Comprehensive solutions for all MCQs, Short-Answer, and Long-Descriptive questions from the CDC-approved Grade XII textbook.
Multiple Choice Questions
✔ (i) Raw facts
Data refers to raw, unprocessed facts and figures — symbols, numbers, or characters — that have not been given context or meaning. For example, the number "28" or the word "Kathmandu" by themselves are data. They carry no meaning until they are organized or interpreted. Options (iii) "Both i and ii" and (iv) are incorrect because data is fundamentally raw, not processed.
✔ (iv) All of the above
Information is the meaningful, processed, and organized form of data. When raw data is collected, processed, and arranged in a meaningful way, it becomes information. So options (i) processed data, (ii) final output, and (iii) organized data all describe aspects of information, making "All of the above" the correct choice.
✔ (iv) All of the above
A database is a systematically organized collection of related data. Census data is a database of population records; a telephone directory is a database of names and phone numbers; a dictionary is a database of words and their meanings. All three are real-life examples of databases.
✔ (i) Package application
MS Access is a packaged application software — a complete software product developed and sold as a ready-to-use package by a vendor (Microsoft). It is not a utility, a tailored (custom) application, or an operating system.
✔ (iv) Attribute
In relational terminology:
• A table = a relation
• A row = a tuple / record
• A column = an attribute / field
An attribute defines one property (like Name, Age, or Roll No.) of each record.
✔ (iii) Unique and not null
A primary key must uniquely identify every row in a table. Therefore, it enforces two constraints:
• Unique — no two rows may share the same primary key value.
• Not Null — every row must have a value; NULL is not allowed.
✔ (i) Duplicate and null
A foreign key references the primary key of another table. Unlike a primary key:
• It can have duplicate values — many rows in the child table may reference the same parent row.
• It can have NULL values — if the relationship is optional (unless explicitly constrained as NOT NULL).
✔ (iv) All of the above
DDL (Data Definition Language) deals with the structure/schema of the database. It is used for:
• Creating the structure of tables
• Linking tables through constraints
• Setting integrity constraints (PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK, etc.)
✔ (iv) Create, Alter, and Drop
The core DDL commands are:
• CREATE — to create new database objects
• ALTER — to modify existing structures
• DROP — to delete database objects
Additional DDL commands include TRUNCATE and RENAME. INSERT, SELECT, and UPDATE belong to DML, not DDL.
✔ (ii) Data Manipulation Language
DML = Data Manipulation Language. It is used to retrieve, insert, update, and delete data stored in the database tables. The primary DML commands are SELECT, INSERT, UPDATE, and DELETE.
✔ (iii) Select, Update, and Delete
DML commands manipulate the data within tables:
• SELECT — retrieves data
• UPDATE — modifies existing data
• DELETE — removes data
ALTER, DROP, and RENAME are DDL commands, not DML.
✔ (iii) SELECT * FROM student WHERE firstname = "Purna";
The correct syntax requires:
• * to select all columns
• = for exact match (not LIKE)
• Proper SELECT * FROM syntax
Option (i) uses LIKE (pattern matching) and is unnecessary; Option (ii) is missing *; Option (iv) is also missing *.
✔ (iii) SELECT * FROM student WHERE firstname LIKE '%K';
The LIKE operator uses wildcards:
• % = any sequence of zero or more characters
• _ = exactly one character
'%K' means "any characters followed by K", i.e., the string ends with K. 'K%' would mean "starts with K".
✔ (i) Hierarchical
The Hierarchical model organizes data in a tree structure with a single root. Each parent node can have multiple child nodes (one-to-many), but each child has exactly one parent (one-to-one between child and parent). It was widely used in IBM's Information Management System (IMS).
✔ (iv) All of the above
The Relational Model (proposed by E.F. Codd) supports all three types of relationships by using primary keys, foreign keys, and linking tables (junction tables for many-to-many). It is the most flexible and widely used database model.
✔ (i) Reduces redundancy
Normalization is the process of organizing data to minimize redundancy (duplicate data) and eliminate anomalies (insertion, update, and deletion anomalies). It achieves this by breaking large tables into smaller, well-structured tables linked by relationships.
✔ (i) Repeating groups of attributes
1NF (First Normal Form) requires that:
• Each cell contains only a single (atomic) value
• There are no repeating groups or multi-valued attributes
• Each record is unique (has a primary key)
Partial dependency is addressed in 2NF; transitive dependency in 3NF.
✔ (ii) Distributed
A Distributed Database consists of multiple interconnected databases spread across different physical locations (sites, cities, or countries) but managed as a single logical database. In contrast, a Centralized Database stores all data in a single location.
✔ (iv) All of the above
Database security encompasses:
• Protection of the database from unauthorized access and threats
• Ensuring data integrity — data is accurate and consistent
• Ensuring confidentiality — only authorized users can view sensitive data
✔ (ii) Authentication
Authentication is the process of verifying the identity of a user — confirming that the person is who they claim to be — typically through usernames/passwords, tokens, or biometrics. Encryption protects data by encoding it; SQL injection is an attack technique, not a security measure.
Short Answer Questions
Q.1Define data and database along with examples.
Data (singular: datum) refers to raw, unprocessed facts and figures — such as numbers, text, symbols, or images — collected from various sources. Data, by itself, does not convey any specific meaning. It is the building block from which information is created.
Examples of Data:
- "Ram", "28", "Kathmandu" — individual values with no context
- A list of numbers: 45, 78, 92 — exam marks without knowing the subject or student
- Symbols: M, F — without knowing they represent gender categories
A database is an organized, systematic collection of related data stored electronically, designed so that it can be easily accessed, managed, updated, and queried. A database not only stores data but also maintains relationships between different data elements and ensures data integrity, security, and consistency.
Examples of Database:
- School Management System Database: stores student records, teacher details, course information, and examination results in related tables
- Hospital Database: patient records, doctor schedules, prescriptions, billing
- National Census Database: population data organized by districts, demographics, and household information
- Library Management Database: books, members, issued records, fine records
- Banking Database: account holders, transactions, loan records
Q.2Define DBMS. Write its advantages and disadvantages.
A DBMS is a software system that enables users to define, create, maintain, and control access to a database. It acts as an interface between the end-user/application and the database itself. It manages how data is stored, retrieved, updated, and secured. Examples include MS-Access, MySQL, Oracle, PostgreSQL, MongoDB, etc.
✅ Advantages of DBMS:
- Reduced Data Redundancy: Centralized control minimizes duplicate data storage across different files or applications
- Data Consistency: Since data is stored in a single place (or linked places), updates automatically reflect everywhere, ensuring consistency
- Data Integrity: Integrity constraints (PRIMARY KEY, FOREIGN KEY, CHECK, NOT NULL, UNIQUE) ensure data accuracy and validity
- Data Security: DBMS provides robust authentication and authorization mechanisms — only authorized users can access specific data
- Data Sharing: Multiple users and applications can access the same database concurrently with proper concurrency control
- Backup and Recovery: Built-in mechanisms to automatically back up data and recover it in case of system failures
- Ease of Data Access: Powerful query languages like SQL make data retrieval fast and flexible
- Reduced Development Time: Developers can use existing DBMS features instead of building data management from scratch
❌ Disadvantages of DBMS:
- High Cost: Purchasing licensed DBMS software (like Oracle) and maintaining powerful hardware can be expensive
- Complexity: Designing, implementing, and managing a database requires skilled database administrators (DBAs)
- Single Point of Failure: A centralized DBMS, if it crashes, can affect all users and applications that depend on it
- Performance Overhead: The abstraction layers (security, concurrency, integrity) introduce processing overhead, which may slow down simple operations
- Size: DBMS software itself requires significant disk space and memory
- Vendor Dependence: Migration from one DBMS to another (e.g., Oracle to MySQL) can be complex and time-consuming
- Training Requirement: Staff need specialized training to use DBMS features effectively
Q.3What is a database object? Explain shortly.
A database object is any defined element within a database that is used to store, manage, or reference data. Database objects are the building blocks of a database system — each serves a specific purpose in data storage and manipulation.
Major Database Objects:
- Table (Relation): The fundamental object that stores data in rows (records/tuples) and columns (fields/attributes). Example:
Studenttable with columns RollNo, Name, Address - Query: A request for data retrieval or manipulation using SQL. Queries SELECT, INSERT, UPDATE, or DELETE data from tables
- Form: A user-friendly interface (screen) for entering, editing, and viewing data one record at a time. Forms provide a graphical way to interact with tables
- Report: A formatted, printable presentation of data retrieved from queries or tables. Reports are designed for analysis and decision-making
- View: A virtual table derived from one or more base tables. It does not store data physically but presents a customized subset of data
- Index: A performance optimization object that speeds up data retrieval operations on a table column
- Macro / Module: Automation objects — macros automate repetitive tasks; modules contain VBA/procedural code for complex operations
Q.4What is a key in DBMS? Write the importance of primary key in a database.
A key is an attribute (or set of attributes) in a table that is used to uniquely identify records and to establish and enforce relationships between tables. Keys play a critical role in maintaining data integrity and enabling efficient data retrieval.
Types of Keys:
- Primary Key: A column (or combination) that uniquely identifies each row; must be UNIQUE and NOT NULL
- Foreign Key: A column in one table that references the primary key of another table, establishing a link/relationship between the two tables
- Candidate Key: All columns (or combinations) that are eligible to become the primary key. A table may have multiple candidate keys
- Alternate Key: A candidate key that was NOT chosen as the primary key
- Composite Key: A primary key consisting of two or more columns combined
- Super Key: Any set of one or more attributes that, taken collectively, can uniquely identify a tuple in a relation
- Unique Identification: Ensures every record in the table can be uniquely identified — no two rows can have the same primary key value
- No NULL Values: Guarantees that every record has a valid identifier, preventing incomplete records
- Data Integrity: Enforces entity integrity by preventing duplicate and null entries
- Establishing Relationships: Serves as the reference point for foreign keys in other tables, enabling relational links
- Indexing and Performance: Databases automatically create an index on the primary key, making searches and joins faster
- Data Consistency: Provides a stable anchor for update and delete operations, ensuring referential integrity across the database
Q.5Write the difference between DDL and DML.
DDL — Data Definition Language
- Deals with the structure/schema of the database
- Used to create, alter, and drop database objects (tables, indexes, views)
- Commands:
CREATE,ALTER,DROP,TRUNCATE,RENAME - Changes affect the database schema (metadata), not the data itself
- DDL statements are auto-committed — changes are permanent and cannot be rolled back
- Defines constraints: PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK, NOT NULL
- Works on the table design level
DML — Data Manipulation Language
- Deals with the data (records) stored within the tables
- Used to retrieve, insert, update, and delete data in tables
- Commands:
SELECT,INSERT,UPDATE,DELETE - Changes affect the actual data within the tables, not the structure
- DML statements can be rolled back (using ROLLBACK/transaction control)
- Works with WHERE clauses to filter specific records
- Works on the data content level
Q.6What is a database model? Explain the different database models shortly.
A database model (or data model) defines the logical structure of a database — how data is organized, stored, related, and manipulated. It provides a blueprint for designing the database and determines how the data appears to the user and how relationships are represented.
Types of Database Models:
1. Hierarchical Model
- Data is organized in a tree-like structure with a single root node
- Each parent can have multiple children, but each child has exactly one parent
- Represents one-to-many relationships naturally
- Example: An organization structure — CEO → Managers → Employees
- Used by: IBM's IMS (Information Management System)
- Limitation: Cannot represent many-to-many relationships easily; data retrieval is complex for non-hierarchical queries
2. Network Model
- An extension of the hierarchical model using a graph structure instead of a tree
- A child node can have multiple parent nodes, allowing many-to-many relationships
- Data is organized as records (collections of fields) connected by pointers in sets
- Offers greater flexibility and efficiency for complex relationships
- Limitation: Complex to design and navigate; structural changes are difficult
3. Relational Model
- Proposed by E.F. Codd in 1970 — the most widely used model today
- Data is organized into tables (relations) with rows (tuples) and columns (attributes)
- Relationships are established through primary keys and foreign keys
- Supports one-to-one, one-to-many, and many-to-many relationships
- Uses SQL as the standard query language
- Examples: MySQL, Oracle, MS-Access, PostgreSQL, SQL Server
4. Flat File Model
- The simplest model — data is stored in a single, two-dimensional table (like a spreadsheet)
- No relationships, no complex structures
- Suitable for: very small, simple datasets
- Limitation: High data redundancy, no integrity constraints, difficult to manage large datasets
5. Entity-Relationship (ER) Model
- A conceptual design model using entities, attributes, and relationships
- Represented visually using ER diagrams
- Used in the design phase before implementing a relational database
6. Object-Oriented Model
- Data is stored as objects (similar to object-oriented programming — classes, inheritance, encapsulation)
- Suitable for complex data types like multimedia, CAD, etc.
- Example: db4o, ObjectDB
Q.7What is data normalization? Explain the different types of data normalization shortly.
Normalization is a systematic process of organizing data in a relational database to reduce data redundancy (duplicate data) and eliminate data anomalies (insertion, update, and deletion anomalies). It involves decomposing large, poorly structured tables into smaller, well-structured tables linked through relationships.
Without normalization, a database may suffer from:
• Insertion Anomaly — Cannot insert data without the presence of other data
• Update Anomaly — Updating one record requires updating multiple rows
• Deletion Anomaly — Deleting one piece of data inadvertently loses other valuable data
Types / Forms of Normalization:
A table is in 1NF if:
• Every column contains only atomic (single, indivisible) values
• There are no repeating groups or multi-valued attributes
• Each row is unique (there exists a primary key)
Example violation: A "Subject" column containing "Java, C++, DBMS" for a single student is NOT 1NF. In 1NF, each subject must be on a separate row.
A table is in 2NF if:
• It is already in 1NF
• There are no partial dependencies — every non-key attribute depends on the entire composite primary key, not just part of it
If the primary key is a single column, then satisfying 1NF automatically satisfies 2NF.
A table is in 3NF if:
• It is already in 2NF
• There are no transitive dependencies — no non-key attribute depends on another non-key attribute (i.e., A → B → C where A is the PK, B is non-key, and C depends on B)
Example: If StudentID → DepartmentID → DepartmentName, then DepartmentName is transitively dependent on StudentID and should be moved to a separate table.
A stronger version of 3NF. A table is in BCNF if:
• For every functional dependency X → Y, X must be a super key
• BCNF addresses cases where a non-key attribute determines part of a candidate key — which 3NF may allow
Q.8Write the difference between centralized and distributed databases.
Centralized Database
- All data is stored at a single, central location (one server)
- Users from different locations access the same central server over a network
- Easier to manage, maintain, and secure — one admin team, one location
- Lower cost for hardware (single server setup)
- If the central server fails, the entire system becomes unavailable
- Slower access for users far from the server (network latency)
- Risk of bottleneck — heavy traffic on one server can degrade performance
- Example: A college storing all student data on a single server in the admin office
Distributed Database
- Data is stored across multiple interconnected sites (servers in different locations)
- Each site can independently process local transactions and also participate in global transactions
- More complex to manage — requires coordination among multiple sites
- Higher cost (multiple servers, networking, synchronization software)
- If one site fails, other sites continue to function — high availability
- Faster local access — users access data from the nearest site
- Better scalability — add new sites as the organization grows
- Example: A multinational bank with databases in Kathmandu, Delhi, and London that are synchronized
| Factor | Centralized Database | Distributed Database |
|---|---|---|
| Data Location | Single site | Multiple sites |
| Fault Tolerance | Low — single point of failure | High — fault isolation |
| Access Speed (local) | Variable (depends on distance) | Fast (nearest site) |
| Management | Simple | Complex |
| Scalability | Limited | Highly scalable |
| Cost | Lower | Higher |
| Consistency | Always consistent | Requires synchronization |
Q.9What is database security? Explain it.
Database security refers to the collective measures, tools, and techniques used to protect a database from unauthorized access, misuse, data breaches, corruption, and threats. It ensures the confidentiality, integrity, and availability of data stored in the database.
Key Aspects of Database Security:
- Confidentiality: Ensuring that sensitive data is accessible only to authorized users
- Integrity: Ensuring that data is accurate, consistent, and has not been tampered with
- Availability: Ensuring that data is accessible to authorized users whenever needed
Common Database Security Techniques:
- Authentication: Verifying the identity of users before granting access (username & password, biometrics, smart cards, two-factor authentication)
- Authorization / Access Control: Defining what each authenticated user can do — read-only, read-write, admin privileges. Uses
GRANTandREVOKESQL commands - Encryption: Converting data into an unreadable format (cipher text) using encryption algorithms so that even if data is intercepted, it cannot be understood without the decryption key
- Integrity Constraints: Rules (PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK, NOT NULL) that ensure data validity and consistency
- Backup and Recovery: Regularly creating copies of the database and maintaining recovery mechanisms to restore data after failures or attacks
- Views: Providing different users with different views/levels of data — hiding sensitive columns from unauthorized users
- Audit Trails: Keeping logs of who accessed or modified what data and when, for accountability and forensic analysis
- SQL Injection Prevention: Using parameterized queries and input validation to prevent malicious SQL code from being injected through user inputs
- Firewalls and Network Security: Protecting the database server from external network attacks
Q.10Study the tables given below and apply the normalization rules on them.
10 (a). Student Table with Multi-Valued Subject
Original Table (Unnormalized):
| StdID (PK) | Student Name | Subject |
|---|---|---|
| 101 | Akriti Dhakal | Java, Computer Network |
| 102 | Aman Sharma | DBMS, C++ |
| 103 | Kopila Giri | Software Engineering |
| 100 | — | — |
Step 1: Apply First Normal Form (1NF) — Remove repeating groups; make each cell atomic:
| StdID (PK) | Student Name | Subject |
|---|---|---|
| 101 | Akriti Dhakal | Java |
| 101 | Akriti Dhakal | Computer Network |
| 102 | Aman Sharma | DBMS |
| 102 | Aman Sharma | C++ |
| 103 | Kopila Giri | Software Engineering |
Step 2: Apply Second Normal Form (2NF) — Remove partial dependencies by decomposing into two tables:
Table 1: Student
| StdID (PK) | Student Name |
|---|---|
| 101 | Akriti Dhakal |
| 102 | Aman Sharma |
| 103 | Kopila Giri |
Table 2: StudentSubject
| StdID (FK) | Subject |
|---|---|
| 101 | Java |
| 101 | Computer Network |
| 102 | DBMS |
| 102 | C++ |
| 103 | Software Engineering |
10 (b). Student-Teacher Table (Unnormalized)
Original Table:
| StdID (PK) | Student Name | TeacherID | TeacherName | Grade |
|---|---|---|---|---|
| 101 | Aadesh Ghimire | 3 | Bijen Shakya | 6 |
| 102 | Dipika Bhujel | 2 | Sona Thapa | 9 |
| 103 | Lakshya Maharjan | 1 | Rakesh Rai | 10 |
Apply Third Normal Form (3NF) — Remove transitive dependency by splitting into two tables:
Table 1: Student
| StdID (PK) | Student Name | TeacherID (FK) | Grade |
|---|---|---|---|
| 101 | Aadesh Ghimire | 3 | 6 |
| 102 | Dipika Bhujel | 2 | 9 |
| 103 | Lakshya Maharjan | 1 | 10 |
Table 2: Teacher
| TeacherID (PK) | TeacherName |
|---|---|
| 1 | Rakesh Rai |
| 2 | Sona Thapa |
| 3 | Bijen Shakya |
Long / Descriptive Answer Questions
Q.11What is a database? What are the different elements of a database? Explain them.
A database is an organized, structured, and persistent collection of related data that is stored electronically and managed by a DBMS. It is designed to efficiently store, retrieve, update, and manage large amounts of data. A database ensures that data is consistent, non-redundant, secure, and shared among multiple users and applications.
Different Elements of a Database:
1. Table (Relation)
- The fundamental element of a relational database — data is organized into tables
- Each table represents an entity (e.g., Student, Teacher, Course)
- A table consists of rows and columns
- Each table has a unique name within the database
2. Field (Column / Attribute)
- A column in a table that represents a specific property of the entity
- Each field has a name (e.g., RollNo, Name, Address) and a data type (INTEGER, VARCHAR, DATE, etc.)
- Fields define what kind of data can be stored in each column
- A table for "Student" might have fields: StudentID, Name, Address, Phone, Grade
3. Record (Row / Tuple)
- A horizontal row in a table that represents a single instance of the entity
- Each record contains values for all fields — one complete entry
- Example: (101, "Ram Bahadur", "Kathmandu", "9841234567", "A") is one record in the Student table
4. Primary Key
- A field (or combination) that uniquely identifies each record in a table
- Must be unique and not null
- Example: StudentID in the Student table
5. Foreign Key
- A field in one table that references the primary key of another table
- Establishes relationships between tables
- Enforces referential integrity — ensures that a record in the child table references a valid record in the parent table
- Example: DeptID in the Student table that references DeptID in the Department table
6. Queries
- Requests for data — used to retrieve, filter, sort, and manipulate data
- Written in SQL (Structured Query Language)
- Example:
SELECT * FROM Student WHERE Grade = 'A'; - Can involve multiple tables through JOIN operations
7. Forms
- User interfaces for entering, editing, and viewing data in a user-friendly manner
- Display one record at a time with labels, text boxes, dropdowns, and buttons
- Reduce errors by providing validation controls and guided data entry
8. Reports
- Formatted presentations of data designed for printing or viewing summaries
- Organize data with headers, groupings, totals, averages, and other calculations
- Used for management decision-making, documentation, and record-keeping
9. Relationships
- Define how tables are connected to each other through keys
- One-to-One (1:1): Each record in Table A matches exactly one record in Table B
- One-to-Many (1:M): One record in Table A can match many records in Table B
- Many-to-Many (M:N): Many records in Table A can match many records in Table B (requires a junction/linking table)
10. Indexes
- Data structures (typically B-trees) that speed up data retrieval on specific columns
- Automatically created on primary keys; can also be created manually on frequently searched columns
- Trade-off: faster reads but slightly slower writes (index must be updated)
Q.12Explain the different network models.
The Network Database Model was developed by Charles Bachman in the 1960s and later standardized by the CODASYL (Conference on Data Systems Languages) committee. It is an extension of the hierarchical model that uses a graph structure instead of a tree, allowing greater flexibility in representing complex data relationships.
Key Characteristics of the Network Model:
- Data is represented as a collection of records (similar to entities) connected by links/pointers (similar to edges in a graph)
- Each record contains fields (data items)
- Records are organized into sets — each set defines an owner-member (one-to-many) relationship between two record types
- A member record can participate in multiple sets, thus belonging to multiple parent records
- Supports many-to-many relationships directly (unlike the hierarchical model)
Structure of the Network Model:
Each record type represents an entity (like a table in relational model). Instances of record types store actual data. Each record has one or more fields (data items) — for example, a Student record may have fields: StdID, Name, Address.
A set is a named, directed relationship between an owner record type (parent) and a member record type (child). Each set instance has exactly one owner and zero or more members. Sets are implemented using physical pointers (linked lists), giving the network model high navigational efficiency.
Relationships between records are maintained through physical pointers (addresses in memory or disk). This means the data structure is visible at the physical level, which makes traversal very fast but makes structural changes difficult.
Advantages of the Network Model:
- Supports many-to-many relationships directly
- Faster data access through pointers — no need to search sequentially
- More flexible than the hierarchical model for complex relationships
- Data integrity is maintained through the set structure
- Suitable for applications with pre-defined, well-understood access patterns
Disadvantages of the Network Model:
- Complex structure — difficult to design, understand, and modify
- Structural dependence — changing the database structure requires rewriting application programs
- No data independence — the physical storage structure is exposed
- Pointer maintenance overhead — inserting/deleting records requires updating many pointers
- Lack of a standard query language (unlike SQL for relational databases)
- Not as widely used today — largely replaced by the relational model
• Owner record: Course (e.g., "Computer Science")
• Member record: Student (e.g., "Ram", "Sita")
• Set: "Enrollment" — one Course owns many Students; one Student can belong to many Course sets (many-to-many)
• A Student who takes 3 courses would be a member in 3 different set instances
Q.13What is data normalization? Explain the normalization rules with examples.
Normalization is a database design technique that organizes tables to minimize data redundancy and eliminate undesirable characteristics called anomalies (Insertion Anomaly, Update Anomaly, Deletion Anomaly). It was introduced by E.F. Codd as part of the relational model. Normalization involves decomposing a large table into smaller, well-structured tables and defining relationships between them.
Normalization Rules (Normal Forms) with Examples:
A table is in 1NF if:
• All column values are atomic (indivisible — one value per cell)
• There are no repeating groups or arrays
• Each row is unique (has a primary key)
Example — Violating 1NF:
| StdID | Name | Subjects |
|---|---|---|
| 101 | Ram Shrestha | Math, Science, English |
| 102 | Sita Tamang | Math, English |
❌ The "Subjects" column has multiple values → Not 1NF
After Applying 1NF:
| StdID | Name | Subject |
|---|---|---|
| 101 | Ram Shrestha | Math |
| 101 | Ram Shrestha | Science |
| 101 | Ram Shrestha | English |
| 102 | Sita Tamang | Math |
| 102 | Sita Tamang | English |
✅ All cells have atomic values — in 1NF
A table is in 2NF if:
• It is already in 1NF
• There are no partial dependencies — every non-key attribute depends on the whole composite primary key, not just part of it
Note: If the PK is a single column, 1NF → 2NF automatically.
Example — Violating 2NF:
Consider a table with composite PK (StdID, Subject):
| StdID | Subject | Name | Grade |
|---|---|---|---|
| 101 | Math | Ram Shrestha | A |
| 101 | Science | Ram Shrestha | B |
| 102 | Math | Sita Tamang | A |
❌ "Name" depends only on StdID (not on Subject) → Partial dependency → Not 2NF
After Applying 2NF — Decompose into:
Table 1: Student
| StdID (PK) | Name |
|---|---|
| 101 | Ram Shrestha |
| 102 | Sita Tamang |
Table 2: Enrollment
| StdID (FK) | Subject | Grade |
|---|---|---|
| 101 | Math | A |
| 101 | Science | B |
| 102 | Math | A |
✅ No partial dependencies — in 2NF
A table is in 3NF if:
• It is already in 2NF
• There are no transitive dependencies — no non-key attribute depends on another non-key attribute
Example — Violating 3NF:
| StdID (PK) | Name | DeptID | DeptName |
|---|---|---|---|
| 101 | Ram | D1 | Computer |
| 102 | Sita | D2 | Management |
❌ StdID → DeptID → DeptName (transitive dependency) → Not 3NF
After Applying 3NF:
Table 1: Student
| StdID (PK) | Name | DeptID (FK) |
|---|---|---|
| 101 | Ram | D1 |
| 102 | Sita | D2 |
Table 2: Department
| DeptID (PK) | DeptName |
|---|---|
| D1 | Computer |
| D2 | Management |
✅ No transitive dependencies — in 3NF
Unnormalized → 1NF (eliminate repeating groups) → 2NF (eliminate partial dependencies) → 3NF (eliminate transitive dependencies) → BCNF (every determinant is a candidate key)
Each higher normal form builds upon the previous one, progressively reducing redundancy and improving data integrity.
Q.14What is database security? How is a database made secure?
Database security encompasses the policies, procedures, tools, and techniques used to protect a database from unauthorized access, misuse, data breaches, accidental or intentional corruption, and various cyber threats. It ensures the three pillars of information security:
• Confidentiality — Only authorized users can view data
• Integrity — Data remains accurate and unaltered by unauthorized means
• Availability — Data is accessible to authorized users whenever needed
Threats to Database Security:
- Unauthorized Access: Intruders or hackers gaining access to the database
- Data Theft: Stealing sensitive data such as passwords, financial records, personal information
- SQL Injection: Malicious SQL code inserted through user inputs to manipulate the database
- Data Corruption: Accidental or intentional modification/deletion of data
- Insider Threats: Authorized users misusing their privileges
- Malware / Viruses: Software designed to damage or exploit the system
- Hardware Failures: Disk crashes, power outages, natural disasters
How is a Database Made Secure? — Security Measures:
The process of verifying the identity of a user before granting access. Common methods:
• Usernames and Passwords — the most basic form
• Two-Factor Authentication (2FA) — password + OTP/token/biometric
• Biometric Authentication — fingerprint, retina, face recognition
• Smart Cards / Digital Certificates
After authentication, defines what each user can do:
• Privilege-based access: Different users have different levels — Admin, Read-Only, Read-Write
• SQL Commands:
GRANT (give privileges) and REVOKE (remove privileges)• Role-based access control (RBAC): Assign permissions to roles, then assign roles to users
• Example:
GRANT SELECT ON Student TO 'user1'; — gives user1 read-only access to the Student table
Converting data into an unreadable format (ciphertext) using encryption algorithms:
• Data at rest encryption: Encrypting stored data on disk
• Data in transit encryption: Encrypting data while it moves over networks (SSL/TLS)
• Encryption algorithms: AES, DES, RSA
• Even if data is stolen, it cannot be read without the decryption key
Database rules that ensure data validity:
• PRIMARY KEY — unique and not null
• FOREIGN KEY — maintains referential integrity
• UNIQUE — prevents duplicate values
• NOT NULL — prevents empty values
• CHECK — enforces domain constraints (e.g., Age > 0)
• Regular backups: Full, incremental, and differential backups stored securely (on-site and off-site/cloud)
• Recovery mechanisms: Transaction logs, checkpoints, and rollback procedures to restore data after hardware failure, corruption, or attacks
• Disaster Recovery Plan: Comprehensive strategy for recovering the entire database system
• Views restrict users to seeing only the data they need
• Hides sensitive columns (e.g., salary, passwords) from unauthorized users
• Example: A student can view their marks but cannot see other students' marks or the salary column of teachers
• Maintains a detailed log of all activities — who accessed what data, when, and what changes were made
• Helps in forensic analysis after a security breach
• Deters misuse since users know their actions are tracked
• Using parameterized queries / prepared statements instead of string concatenation
• Input validation: Sanitizing all user inputs
• Stored procedures: Using pre-compiled SQL statements
• Least privilege principle: Database accounts used by applications should have minimal necessary permissions
• Firewalls control incoming and outgoing network traffic to the database server
• Intrusion Detection Systems (IDS) monitor for suspicious activity
• VPNs for secure remote access
• Network segmentation: Database servers placed in isolated, secure network zones
• Securing the physical server room — locks, security cameras, biometric door access
• Environmental controls: Fire suppression, temperature control, UPS for power backup
• Prevents physical theft or tampering of database servers
Frequently asked questions
What is Database management system (DBMS) about?
This chapter introduces students to the fundamental concepts of Database Management Systems (DBMS), covering data vs. information, database components, different database models, normalization techniques, and essential security measures. It aims to provide a comprehensive understanding of how data is organized, managed, and protected.
Which topics are covered in Database management system (DBMS)?
Class 12 Computer Science “Database management system (DBMS)” covers: Data vs. Information; Database Management System (DBMS); Database Models (Hierarchical, Network, Relational); Database Objects (Tables, Queries, Forms, Reports); Keys (Primary, Foreign, Candidate); Data Definition Language (DDL) and Data Manipulation Language (DML); Database Normalization (1NF, 2NF, 3NF); Database Security (Authentication, Authorization, Encryption).
What should I focus on in Database management system (DBMS) for the exam?
Students should focus on understanding the definitions, differences between concepts (like DDL vs. DML, centralized vs. distributed), the purpose and application of normalization, and the core principles of database security.
What are the key formulas or definitions in Database management system (DBMS)?
Data: Raw, unprocessed facts and figures.; Information: Processed, organized, and meaningful data.; Primary Key: Unique and NOT NULL identifier for a record.; Foreign Key: References a Primary Key in another table, can be duplicate and NULL.; Normalization: Process to reduce redundancy and anomalies in a database..
Where can I read the Class 12 Computer Science “Database management system (DBMS)” solutions?
Right on this page. They are free and you do not need to sign up. For chapter quizzes and the AI tutor, install the Sikshya Plus app.
Study tips
Do not just read it. Practice it.
You have read the solutions for Database management system (DBMS). Now test yourself, ask the AI tutor and keep your streak going.




- AI quizzes for this chapterTest yourself with instant feedback and explanations after every answer.
- AI tutor, free, 24/7Stuck on a question? Ask in your own words and get a step-by-step explanation.
- 14 AI tools in one appSummarizer, grammar checker, flashcards, essay help, math solver and more.
- Past questions and notesPast papers and your own notes organized chapter by chapter.