Computer Science

Class 12 Computer Science: Complete DBMS, Normalization & SQL Study Notes

Comprehensive summary of Class 12 NEB Computer Science Unit 1 (DBMS). Master Relational Models, Keys, 1NF, 2NF, 3NF Normalization rules, SQL DDL/DML commands, and ACID transactional integrity.

Class 12 Computer Science: Complete DBMS, Normalization & SQL Study Notes

Unit 1: Database Management System (DBMS) โ€” NEB Class 12 Notes

According to the Curriculum Development Centre (CDC) of Nepal, the Database Management System (DBMS) unit carries significant weight in the final board examination. Below is the complete original revision guide structured for high scoring.

1. Introduction to DBMS

A Database Management System (DBMS) is system software that enables users to define, create, maintain, and control access to a shared database. Unlike traditional file-based processing systems, a DBMS prevents data redundancy and inconsistency.

  • Data Redundancy: Duplication of the same data items in multiple places is minimized.
  • Data Independence: Separation of data structure from application programs (Physical and Logical data independence).
  • Data Security & Integrity: Ensures constraints (Primary Key, Foreign Key, Not Null, Unique) are enforced.

2. The Relational Model & Keys

In a Relational Database Management System (RDBMS), data is stored in two-dimensional tables called relations (composed of rows called tuples and columns called attributes).

  • Primary Key: An attribute or minimal set of attributes that uniquely identifies each tuple in a table. It cannot contain null values.
  • Candidate Key: Any attribute that satisfies all requirements to become a primary key.
  • Foreign Key: An attribute in a table that references the primary key of another table, establishing a referential integrity relationship.
  • Composite Key: A primary key formed by combining two or more attributes.

3. Database Normalization (1NF, 2NF, 3NF)

Normalization is a systematic approach to decomposing tables to eliminate data redundancy and undesirable insertion, update, and deletion anomalies.

Normal Form Condition Required Eliminated Anomaly
1NF (First Normal Form) Each column contains only atomic (indivisible) values; no repeating groups. Multi-valued attributes
2NF (Second Normal Form) Must be in 1NF, and every non-prime attribute must be fully functionally dependent on the entire primary key. Partial Functional Dependency
3NF (Third Normal Form) Must be in 2NF, and no non-prime attribute can depend transitively on the primary key (X → Y and Y → Z). Transitive Dependency

4. Structured Query Language (SQL) Categories

SQL is divided into three primary sub-languages according to NEB syllabus:

  1. DDL (Data Definition Language): Defines and modifies the database schema. Commands: CREATE, ALTER, DROP, TRUNCATE.
  2. DML (Data Manipulation Language): Retrieves and manipulates data within tables. Commands: SELECT, INSERT, UPDATE, DELETE.
  3. DCL (Data Control Language): Manages user privileges and access permissions. Commands: GRANT, REVOKE.

5. ACID Properties of Database Transactions

To preserve database integrity during concurrent execution and system crashes, transactions must adhere to the ACID model:

  • Atomicity: "All or nothing" — either the entire transaction is executed or aborted completely.
  • Consistency: The database must transition from one valid state to another valid state.
  • Isolation: Concurrent transactions execute independently without interfering with one another.
  • Durability: Once a transaction is committed, its effects permanently survive system crashes.
Official Board Exam Tip: Questions asking to differentiate between DBMS vs RDBMS, write SQL queries for Table Creation, and normalize an unnormalized student record up to 3NF are frequently asked for 5-8 marks in Section B & C.
Official Curriculum & Reference Material This study note is prepared according to the latest official CDC (Curriculum Development Centre) and NEB Nepal syllabus guidelines.
Visit Official Source
Dhurba Sodari (DhurveX)
Written by Dhurba Sodari (DhurveX)

Student, Web Developer & Cyber Security Enthusiast passionate about educational technology and programming.