Unit 3 • 15 Marks / 23 Periods Ch 7 (10M) + Ch 8 (5M) Bureau Textbook pp. 213–266

Unit 3: Relational Database Management System (DBMS & MySQL)

Covers Chapters 7 & 8 (PDF pp. 213–266): RDBMS Concepts (File vs DBMS, Codd's 12 Rules, Relational Keys, CHAR vs VARCHAR, Commercial/Open Source & 5 Mobile DBs) and Introduction to MySQL (ANSI SQL-99 DDL/DML/TCL/DCL, Constraints, NULL, LIKE Patterns & LoanAccount Queries).

Official Weightage 15 / 70 Marks (21.4%)
Teaching Periods 23 Periods (10 + 13)
SQL Dialect MySQL (ANSI SQL-99)
PDF Pages pp. 213 – 266
Unit 3 Visual Mindmap

Unit 3 Mindmap: RDBMS Foundations & MySQL SQL-99 (15 Marks)

Interactive high-yield mindmap uniting Chapter 7 relational theory and Chapter 8 MySQL commands.

Unit 3: Relational Database Management System — Chapter Mindmap
Unit 3: RDBMS & MySQL (15 Marks • 23 Periods)
Ch 7 Database Management System (10M / 10P) + Ch 8 Introduction to MySQL (5M / 13P)
  • File vs DBMS: Solves redundancy, inconsistency, isolation, atomicity & concurrent access issues
  • Terms: Relation (Table), Tuple (Row), Attribute (Column), Domain (allowed values), Degree (#cols), Cardinality (#rows)
  • Entity: Entity Type (schema definition) vs Entity Instance (one specific row)
  • Keys: Candidate Key → chosen Primary Key + Alternate Keys; Composite Key (STREAM+ROLL); Foreign Key (referential link)
  • Cardinality: 1:1, 1:M, M:1, M:M relationships
  • E.F. Codd (1970): Relational Model pioneer & 12 Rules (Rule 0 Foundation .. Rule 12 Non-Subversion)
  • CHAR(n): Fixed length (max 255), static pad, 50% faster for fixed codes
  • VARCHAR(n): Variable length (max 65,535 row-shared), dynamic + length prefix
  • Open Source vs Commercial: MySQL, PostgreSQL, Enterprise DB vs Oracle, IBM DB2, SQL Server
  • 5 Mobile DBs: BerkeleyDB, Couchbase Lite, LevelDB, SQLite, UnQLite
  • SQL Evolution: IBM SEQUEL (1970s Chamberlin/Boyce) → Oracle V2 (1979) → ANSI SQL (1986) / SQL-99; MySQL AB (1994/95)
  • 3 Components: Server (mysqld), Clients (mysql), Client Library
  • Sub-languages: DDL (CREATE/ALTER/DROP), DML (SELECT/INSERT/UPDATE/DELETE), TCL, DCL
  • Types: TINYINT..BIGINT, FLOAT/DOUBLE/DECIMAL; CHAR..LONGTEXT; DATE/TIME/DATETIME/YEAR
  • 6 Constraints: NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, DEFAULT, CHECK
  • NULL Rule: Arithmetic with NULL = NULL; filter with IS NULL (never = NULL); Comments: -- , #, /* */
  • Clauses: DISTINCT, Aliases (AS), WHERE, BETWEEN, IN, ORDER BY ASC/DESC
  • LIKE Wildcards: % (0 or more chars) vs _ (exactly 1 char)
  • Division & Mod: 9 / 2 = 4.5 vs 9 DIV 2 = 4; % or MOD
Chapter 7 • Official Bureau Syllabus

Database Management System (RDBMS Concepts, Keys, Codd Rules & Data Types)

10 Marks 10 Periods PDF pp. 213–228

Data vs Information: Raw unorganized facts (e.g., "88, Aditya") are Data; processed meaningful output is Information. A DBMS manages interrelated collections of data and overcomes traditional flat-file drawbacks: data redundancy, inconsistency, difficulty in accessing data, data isolation, integrity violations, atomicity failures, concurrent access anomalies, and weak security.

Relational Database Table Anatomy and Keys Relationship Diagram Annotated STUDENT relation showing Attributes (Degree 4), Tuples (Cardinality 3), Candidate Keys, Primary Key, Alternate Key, Composite Key, and Foreign Key referencing a parent table. Anatomy of a Relational Table (Relation = STUDENT • Degree = 4 • Cardinality = 3) RollNo (PK) RegNo (Alt Key) Name (Attribute) DeptId (FK) 101 CHSE-901 Ananya Mohanty D01 102 CHSE-902 Bikash Panda D02 103 CHSE-903 Subhashree Das D01 DEPARTMENT (Parent) D01 | Science IT D02 | Commerce IT • Tuple = Horizontal Row (Entity Instance) | Attribute = Vertical Column | Domain = Valid Pool of Values for a Column • Candidate Keys = All minimal unique attributes ({RollNo}, {RegNo}) | Primary Key = Chosen Candidate Key (NOT NULL + UNIQUE) • Alternate Key = Unchosen Candidate Key (RegNo) | Composite Key = Multi-column key (e.g., STREAM + ROLL in Odisha admission) • Foreign Key = Column referencing Primary Key of another table (enforces Referential Integrity across 1:1, 1:M, M:1, M:M)
Figure 3.1: Relational Model Anatomy, Candidate/Primary/Alternate/Composite/Foreign Keys & Cardinality (Ch 7).

7.1 E.F. Codd's 1970 Relational Model & 12 Rules Summary

Dr. Edgar F. Codd published the relational model in 1970 (IBM) and defined Codd's 12 Rules (numbered 0–12) specifying what makes a database truly relational: Rule 0 (Foundation), Rule 1 (Information — all data in tables), Rule 2 (Guaranteed Access via table+PK+column), Rule 3 (Systematic treatment of NULL), Rule 4 (Active online catalog), Rule 5 (Comprehensive SQL sublanguage), Rule 6 (View updating), Rule 7 (Set-level Insert/Update/Delete), Rules 8–10 (Physical, Logical & Integrity Independence), Rule 11 (Distribution Independence), Rule 12 (Non-Subversion).

7.2 4 Data Type Classes, CHAR vs VARCHAR & Open Source / Mobile DBs

Feature CHAR(n) VARCHAR(n)
Storage LengthFixed length (0 to 255 bytes)Variable length (1 to 65,535 bytes shared in row)
Padding BehaviorPads shorter strings with trailing spaces to fit nStores exact characters + 1 or 2 length-prefix bytes
Speed vs SpaceStatic allocation → up to 50% faster searchDynamic allocation → saves disk space
Best Textbook UseFixed-width codes (PIN code, Gender M/F, Flag Y/N)Variable-length names, addresses, descriptions
Commercial vs Open Source RDBMS
  • Commercial Proprietary: Oracle Database, IBM DB2, Microsoft SQL Server, Sybase.
  • Open Source RDBMS: MySQL, PostgreSQL, Enterprise DB (textbook Ch 7 MCQ answer!), MariaDB, Firebird.
5 Textbook Mobile Databases (p. 226)
  • Berkeley DB: Embedded key-value (AGPL license).
  • Couchbase Lite: Embedded NoSQL JSON sync (Apache).
  • LevelDB: Fast key-value store (BSD license).
  • SQLite: Serverless ACID SQL DB (Public Domain).
  • UnQLite: Self-contained document/KV engine (BSD-2).
CHSE Syllabus Unit Reference: Chapter 7: Database Management System (pp. 213–228)
Aligned with Odisha State Bureau Higher Secondary (+2) IT Part - I syllabus (Reference pp. 213+). All topic summaries, diagrams, and solved exercises are included directly on this page.
Chapter 8 • Official Bureau Syllabus

Introduction to MySQL (ANSI SQL-99, Data Types, Constraints & Queries)

5 Marks 13 Periods PDF pp. 229–266

History: Structured Query Language began as SEQUEL at IBM in the 1970s (Donald D. Chamberlin, Raymond F. Boyce, Messerly), commercialized as Oracle V2 (1979), standardized by ANSI (1986) and ISO (SQL-99). MySQL was founded by MySQL AB (Sweden, 1994/1995; named after co-founder Michael Widenius's daughter My).

MySQL 3-Component Architecture and SQL Command Categories MySQL Clients and Client Library communicate with MySQL Server (mysqld), executing 4 SQL categories: DDL, DML, TCL, and DCL. 3 MySQL Components 1. MySQL Server (mysqld) Manages DBs, queries & locks 2. Client Programs (mysql) mysql CLI, mysqldump, JDBC 3. Client Library (C API) Protocol interface to server 4 SQL Sub-Languages (ANSI SQL-99) DDL (Data Definition) CREATE, ALTER, DROP, TRUNCATE Defines/modifies schema structure DML (Data Manipulation) SELECT, INSERT, UPDATE, DELETE Reads & modifies table rows TCL (Transaction Control) COMMIT, ROLLBACK, SAVEPOINT Saves or undoes DML transactions DCL (Data Control) GRANT, REVOKE Controls user privileges & rights
Figure 3.2: MySQL 3-Component Architecture & DDL/DML/TCL/DCL Classification (Ch 8, pp. 230–234).

8.1 MySQL Data Types, Identifiers (Max 30 Chars) & 6 Constraints

Numeric, String & Date/Time Types
  • Numeric: TINYINT (1B), SMALLINT (2B), MEDIUMINT (3B), INT (4B), BIGINT (8B), FLOAT(M,D), DOUBLE, DECIMAL(M,D).
  • String: CHAR(n), VARCHAR(n), TINYTEXT/TEXT/MEDIUMTEXT/LONGTEXT, BLOB.
  • Date/Time: DATE ('YYYY-MM-DD'), TIME ('HH:MM:SS'), DATETIME, TIMESTAMP, YEAR.
6 Integrity Constraints & Comments
  • NOT NULL (forbids empty/missing value) & UNIQUE (no duplicates, allows NULLs).
  • PRIMARY KEY (= NOT NULL + UNIQUE).
  • FOREIGN KEY ... REFERENCES (links parent PK).
  • DEFAULT val (fallback value) & CHECK (cond).
  • 3 SQL Comment Styles: -- comment (space after --!), # comment, /* multi-line */.

8.2 Essential MySQL Clauses, Operators, NULL Rules & Precedence

MySQL Operator Precedence and LIKE Pattern Matching Guide MySQL precedence from parentheses and arithmetic down to NOT, AND, OR, alongside LIKE % and _ wildcards and NULL arithmetic rules. MySQL Operator Precedence (High → Low) 1. Parentheses ( ) & Unary - / ! 2. *, / (float), DIV (int), %, MOD 3. Addition/Sub +, - 4. Comparison: =, !=, <>, <, <=, >, >=, IS NULL 5. BETWEEN, IN, LIKE, NOT 6. Logical AND (&&) before OR (||) Note: 9 / 2 = 4.5000 whereas 9 DIV 2 = 4 LIKE Wildcards & NULL Arithmetic Rules % (Percent) : matches 0, 1, or MANY chars LIKE 'S%' (starts with S) • LIKE '%s' (ends s) _ (Underscore): matches EXACTLY ONE char LIKE '_a%' (2nd char 'a') • LIKE '____' (4 chars) NULL + 100 = NULL! Filter with WHERE col IS NULL
Figure 3.3: MySQL Precedence, Integer vs Float Division, LIKE Wildcards & NULL Handling.
Solved Bureau Exercise — LoanAccount & Employee MySQL Queries (PDF pp. 265–266)
-- 1. Create Database 'LOAN' and table 'LoanAccount' (Ch 8 Long Q3)
CREATE DATABASE LOAN;
USE LOAN;

CREATE TABLE LoanAccount (
  AcctNo INT PRIMARY KEY,
  Cust_Name VARCHAR(40) NOT NULL,
  LoanAmount INT,
  IntRate DECIMAL(5,2),
  Instalments INT,
  Start_Date DATE
);

INSERT INTO LoanAccount VALUES (1, 'Shreyas Pradhan', 300000, 12.00, 36, '2009-07-19');
INSERT INTO LoanAccount (AcctNo, Cust_Name, LoanAmount, Instalments) VALUES (3, 'A A Dumpy', 300000, 36);
-- Note Q5: Any field omitted in INSERT INTO defaults to NULL (unless DEFAULT defined).

-- 2. Display details of all loans / selective columns / filter Instalments < 40
SELECT * FROM LoanAccount;
SELECT AcctNo, Cust_Name, LoanAmount FROM LoanAccount;
SELECT * FROM LoanAccount WHERE Instalments < 40;

-- 3. Short Q2 Essentials (Employee / Student Queries)
SHOW DATABASES;
DESC LoanAccount;                                   -- Show table structure
ALTER TABLE Employee ADD Email VARCHAR(60);         -- Add column
ALTER TABLE Employee CHANGE EmpName Name VARCHAR(40); -- Rename column
SELECT DISTINCT Dept FROM Employee;                 -- Unique departments
SELECT * FROM Employee WHERE Name LIKE BINARY 'd%'; -- Case-sensitive starts with 'd' (not 'D')
SELECT * FROM Employee WHERE Name LIKE '%s';        -- Ends with 's'
SELECT EmpCode, Name, Salary FROM Employee ORDER BY Salary DESC;
UPDATE Student SET Name='Duani' WHERE Name='Dunia'; -- (See Ex Q11)
DELETE FROM Student WHERE marks < 33;
DROP TABLE LoanAccount;                             -- Deletes structure + data

8.3 Expected MySQL Query Output Tables (Exam Output-Prediction Practice)

SELECT AcctNo, Cust_Name, IntRate, Instalments FROM LoanAccount WHERE Instalments < 40;
AcctNoCust_NameIntRateInstalments
1Shreyas Pradhan12.0036
3A A DumpyNULL36
5Rakesh Bhoi12.5036
SELECT AcctNo, LoanAmount * IntRate / 100 AS YearlyInt FROM LoanAccount WHERE AcctNo IN (1,3,4);
AcctNoYearlyIntWhy?
136000.00300000 × 12.00 / 100
3NULLAnything × NULL = NULL!
4100000.00800000 × 12.50 / 100
CHSE Syllabus Unit Reference: Chapter 8: Introduction to MySQL (pp. 229–266)
Aligned with Odisha State Bureau Higher Secondary (+2) IT Part - I syllabus (Reference pp. 229+). All topic summaries, diagrams, and solved exercises are included directly on this page.
Bureau Textbook Question Bank

Complete Solved Textbook Exercises — Chapters 7 & 8

  • Q1–Q7 Key Concepts: Tuple = Row; Attribute = Column; Degree = number of columns; Cardinality = number of rows; Primary Key uniquely identifies every tuple without NULL; Foreign Key links child table column to parent table Primary Key.
  • Q8 (Open Source DBMS in textbook list): Enterprise DB (alongside MySQL & PostgreSQL, vs Oracle/DB2/SQL Server).
  • CHAR vs VARCHAR: Write exact byte limits (255 vs 65,535), padding vs length-prefix, and static 50% speed advantage.

  1. IN operator: (a) checks a value in a list (e.g., WHERE city IN ('Cuttack','Puri')).
  2. DROP DATABASE db;: removes a Database permanently.
  3. INSERT INTO: (c) inserts new row into a table.
  4. Sort output rows: (d) ORDER BY.
  5. Change 'Dunia' to 'Duani': UPDATE Student SET Name='Duani' WHERE Name='Dunia';.
  6. Delete rows below marks threshold: DELETE FROM Student WHERE marks < 33; (textbook print shows 351 typo in options, statement syntax uses DELETE FROM ... WHERE).
  7. DELETE vs DROP: DELETE is a DML command removing selected/all rows while keeping table schema (can use WHERE & ROLLBACK); DROP is a DDL command destroying the entire table definition + data permanently.
  8. What happens on arithmetic with NULL? Any arithmetic operation involving NULL always returns NULL (never 0).

Unit 3 Board Exam Practice Quiz (10 Questions)

Click any option to verify your CHSE exam readiness instantly.
Score: 0 / 10
Q1. If a STUDENT relation has 5 columns and 40 student records, what are its Degree and Cardinality?
Answer Explanation: Degree equals the total number of attributes (5 columns); Cardinality equals the total number of tuples (40 rows).
Q2. Which key uniquely identifies records by combining two or more columns (such as STREAM + ROLL)?
Answer Explanation: A Composite Key uses two or more attributes together when no single column alone can guarantee uniqueness.
Q3. What is the maximum string length supported by MySQL CHAR(n) vs VARCHAR(n)?
Answer Explanation: CHAR(n) holds up to 255 characters statically; VARCHAR(n) dynamically supports up to 65,535 bytes shared across the row.
Q4. Which of these is a Public Domain embedded mobile SQL database listed in Chapter 7?
Answer Explanation: Textbook Chapter 7 lists SQLite (Public Domain), BerkeleyDB (AGPL), Couchbase Lite (Apache), LevelDB (BSD), and UnQLite (BSD-2).
Q5. Which command category includes CREATE TABLE, ALTER TABLE, and DROP TABLE?
Answer Explanation: DDL (Data Definition Language) defines and modifies database objects/schemas (CREATE, ALTER, DROP, TRUNCATE).
Q6. What does SELECT 50 + NULL; evaluate to in MySQL?
Answer Explanation: NULL represents an unknown/missing value; any arithmetic calculation with NULL always evaluates to NULL.
Q7. Which LIKE pattern matches any 4-letter customer name ending with "n"?
Answer Explanation: Each underscore (_) matches exactly one character, so three underscores followed by n (___n) matches 4-letter names ending in n.
Q8. What is the output of SELECT 9 / 2, 9 DIV 2; in MySQL?
Answer Explanation: "/" performs floating-point division (4.5000) whereas "DIV" returns the truncated integer quotient (4).
Q9. Which SQL clause correctly filters rows having missing/unspecified IntRate?
Answer Explanation: Comparisons with = NULL evaluate to NULL/unknown; always use IS NULL or IS NOT NULL.
Q10. Which three comment prefixes/blocks are valid in MySQL?
Answer Explanation: MySQL supports -- (followed by space), # for single-line comments, and /* ... */ for multi-line comments.