From 9276cf77199172542c00bb234bf954ce59143065 Mon Sep 17 00:00:00 2001 From: MD JUBER QURAISHI Date: Sat, 16 May 2026 06:53:11 +0530 Subject: [PATCH 1/3] docs: add DBMS subject with course outline and introduction chapter --- app/sem4/dbms/[chapter]/page.tsx | 114 ++++++++++++++++++++ app/sem4/dbms/components/sidebar.tsx | 73 +++++++++++++ app/sem4/dbms/content/chapter0.tsx | 149 +++++++++++++++++++++++++++ app/sem4/dbms/layout.tsx | 28 +++++ app/sem4/dbms/page.tsx | 8 ++ 5 files changed, 372 insertions(+) create mode 100644 app/sem4/dbms/[chapter]/page.tsx create mode 100644 app/sem4/dbms/components/sidebar.tsx create mode 100644 app/sem4/dbms/content/chapter0.tsx create mode 100644 app/sem4/dbms/layout.tsx create mode 100644 app/sem4/dbms/page.tsx diff --git a/app/sem4/dbms/[chapter]/page.tsx b/app/sem4/dbms/[chapter]/page.tsx new file mode 100644 index 0000000..9ff52de --- /dev/null +++ b/app/sem4/dbms/[chapter]/page.tsx @@ -0,0 +1,114 @@ +import Link from "next/link"; +import { Ch0Content } from "../content/chapter0"; +import { Ch1Content } from "../content/chapter1"; +// import { Ch2Content } from "../content/chapter2"; +// import { Ch3Content } from "../content/chapter3"; +// import { Ch4Content } from "../content/chapter4"; +// import { Ch5Content } from "../content/chapter5"; +// import { Ch6Content } from "../content/chapter6"; +// import { Ch7Content } from "../content/chapter7"; +// import { Ch8Content } from "../content/chapter8"; + +import { ArrowBigLeft, ArrowBigRight } from "lucide-react"; +import { Righteous } from "next/font/google"; + +const righteous = Righteous({ + subsets: ["latin"], + weight: "400", + variable: "--font-righteous", +}); + +const chapters = [ + { id: "ch0", title: "Course Outline", component: Ch0Content }, + { id: "ch1", title: "Introduction to Databases", component: Ch1Content }, + // { id: "ch2", title: "Entity-Relationship Model", component: Ch2Content }, + // { id: "ch3", title: "Relational Model and SQL", component: Ch3Content }, + // { id: "ch4", title: "Normalization", component: Ch4Content }, + // { id: "ch5", title: "Transactions and Concurrency Control", component: Ch5Content }, + // { id: "ch6", title: "Indexing and Hashing", component: Ch6Content }, + // { id: "ch7", title: "Query Processing and Optimization", component: Ch7Content }, + // { id: "ch8", title: "Recovery and Security", component: Ch8Content }, +]; + +type ChapterProps = { + params: { chapter: string }; +}; + +export default function ChapterPage({ params }: ChapterProps) { + const currentIndex = chapters.findIndex((c) => c.id === params.chapter); + const chapter = chapters[currentIndex]; + + if (!chapter) { + return

Chapter not found

; + } + + const ChapterComponent = chapter.component; + const prevChapter = currentIndex > 0 ? chapters[currentIndex - 1] : null; + const nextChapter = currentIndex < chapters.length - 1 ? chapters[currentIndex + 1] : null; + + return ( +
+
+

+ Database Management Systems +

+ +

+ {chapter.title} +

+ +
+ {prevChapter ? ( + + + Previous + + ) :
} + + {nextChapter ? ( + + Next + + + ) :
} +
+ +
+ + +
+ +
+ {prevChapter ? ( + + + {prevChapter.title} + + ) :
} + + {nextChapter ? ( + + {nextChapter.title} + + + ) :
} +
+
+ ); +} \ No newline at end of file diff --git a/app/sem4/dbms/components/sidebar.tsx b/app/sem4/dbms/components/sidebar.tsx new file mode 100644 index 0000000..7e092db --- /dev/null +++ b/app/sem4/dbms/components/sidebar.tsx @@ -0,0 +1,73 @@ +"use client"; +import { Righteous } from "next/font/google"; +import Link from "next/link"; +import { usePathname } from "next/navigation"; +import { useState } from "react"; + +const righteous = Righteous({ + subsets: ["latin"], + weight: "400", + variable: "--font-righteous", +}); + +export default function Sidebar() { + const pathname = usePathname(); + const [open, setOpen] = useState(true); + + const chapters = [ + { id: "ch0", title: "Course Outline" }, + { id: "ch1", title: "Introduction to Databases" }, + // { id: "ch2", title: "Entity-Relationship Model" }, + // { id: "ch3", title: "Relational Model and SQL" }, + // { id: "ch4", title: "Normalization" }, + // { id: "ch5", title: "Transactions and Concurrency Control" }, + // { id: "ch6", title: "Indexing and Hashing" }, + // { id: "ch7", title: "Query Processing and Optimization" }, + // { id: "ch8", title: "Recovery and Security" }, + ]; + + return ( +
+ + + +
+ ); +} \ No newline at end of file diff --git a/app/sem4/dbms/content/chapter0.tsx b/app/sem4/dbms/content/chapter0.tsx new file mode 100644 index 0000000..044002b --- /dev/null +++ b/app/sem4/dbms/content/chapter0.tsx @@ -0,0 +1,149 @@ +export const Ch0Content = () => { + return ( +
+

+ Welcome to Database Management Systems — + a core course designed to help you understand how data is organized, stored, + retrieved, and managed efficiently. This course covers relational models, SQL, + normalization, transactions, indexing, and more. +

+ +
+ +
+

+ Module I: Introduction to Databases +

+
    +
  • What is a database and why we need it
  • +
  • File system vs database approach
  • +
  • Advantages of DBMS over file systems
  • +
  • Types of databases: relational, hierarchical, network, object-oriented
  • +
  • Database users: end users, application programmers, DBA
  • +
  • DBMS architecture: 1-tier, 2-tier, 3-tier
  • +
+
+ +
+ +
+

+ Module II: Entity-Relationship Model +

+
    +
  • Entities, attributes, and relationships
  • +
  • Types of attributes: simple, composite, multivalued, derived
  • +
  • Cardinality: one-to-one, one-to-many, many-to-many
  • +
  • Participation constraints: total and partial
  • +
  • ER diagram notation and conventions
  • +
  • Extended ER features: specialization, generalization, aggregation
  • +
+
+ +
+ +
+

+ Module III: Relational Model and SQL +

+
    +
  • Relational model: tables, tuples, attributes, domains
  • +
  • Keys: primary, candidate, foreign, super key
  • +
  • Relational algebra operations
  • +
  • SQL basics: DDL, DML, DCL, TCL
  • +
  • Joins: inner, outer, natural, cross
  • +
  • Subqueries, views, and aggregation functions
  • +
+
+ +
+ +
+

+ Module IV: Normalization +

+
    +
  • Functional dependencies and their types
  • +
  • Anomalies: insertion, deletion, update
  • +
  • Normal forms: 1NF, 2NF, 3NF, BCNF
  • +
  • Decomposition: lossless join and dependency preservation
  • +
  • Multivalued dependencies and 4NF
  • +
  • Practical approach to normalization
  • +
+
+ +
+ +
+

+ Module V: Transactions and Concurrency Control +

+
    +
  • Transaction concept and ACID properties
  • +
  • Transaction states: active, partially committed, committed, failed, aborted
  • +
  • Concurrency problems: lost update, dirty read, unrepeatable read
  • +
  • Concurrency control techniques: locking, timestamps
  • +
  • Two-phase locking protocol
  • +
  • Deadlock detection and recovery
  • +
+
+ +
+ +
+

+ Module VI: Indexing and Hashing +

+
    +
  • Basic concepts of indexing
  • +
  • Dense and sparse indexes
  • +
  • B-tree and B+ tree indexing
  • +
  • Hashing techniques: static and dynamic
  • +
  • Comparison of indexing vs hashing
  • +
  • When to use which technique
  • +
+
+ +
+ +
+

+ Module VII: Query Processing and Optimization +

+
    +
  • Steps in query processing
  • +
  • Query cost estimation
  • +
  • Equivalence of relational expressions
  • +
  • Query optimization techniques
  • +
  • Nested loop joins and merge joins
  • +
  • Query execution plans
  • +
+
+ +
+ +
+

+ Module VIII: Recovery and Security +

+
    +
  • Types of failures: transaction, system, media
  • +
  • Recovery techniques: log-based, shadow paging
  • +
  • Checkpoints and their role in recovery
  • +
  • Database security concepts
  • +
  • Authorization and authentication
  • +
  • SQL injection and prevention
  • +
+
+ +
+ +

+ By the end of this course, you will understand how to design databases, + write efficient SQL queries, normalize data, manage transactions, and + handle indexing and recovery — providing a strong foundation for + real-world database development and system design. +

+
+ ); +}; diff --git a/app/sem4/dbms/layout.tsx b/app/sem4/dbms/layout.tsx new file mode 100644 index 0000000..de8664c --- /dev/null +++ b/app/sem4/dbms/layout.tsx @@ -0,0 +1,28 @@ +import Navbar from "../../components/navbar"; +import Sidebar from "./components/sidebar"; + +export const metadata = { + title: "Database Management Systems | openCSE", + description: + "Free and Open Documentations for Database Management Systems", +}; + +export default function DBMSLayout({ + children, +}: { + children: React.ReactNode; +}) { + return ( +
+ +
+ +
+
+ {children} +
+
+
+
+ ); +} \ No newline at end of file diff --git a/app/sem4/dbms/page.tsx b/app/sem4/dbms/page.tsx new file mode 100644 index 0000000..c7daade --- /dev/null +++ b/app/sem4/dbms/page.tsx @@ -0,0 +1,8 @@ +export default function Home() { + return ( +
+

Welcome to the Tutorial

+

Select a chapter from the sidebar to get started.

+
+ ); +} \ No newline at end of file From 52b1dc37a3022fd1ef3a6dff09bdebe4977a662c Mon Sep 17 00:00:00 2001 From: MD JUBER QURAISHI Date: Sat, 16 May 2026 06:58:25 +0530 Subject: [PATCH 2/3] docs: add DBMS chapter 1 - introduction to databases --- app/sem4/dbms/content/chapter1.tsx | 164 +++++++++++++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 app/sem4/dbms/content/chapter1.tsx diff --git a/app/sem4/dbms/content/chapter1.tsx b/app/sem4/dbms/content/chapter1.tsx new file mode 100644 index 0000000..30ab5f7 --- /dev/null +++ b/app/sem4/dbms/content/chapter1.tsx @@ -0,0 +1,164 @@ +export const Ch1Content = () => { + return ( +
+

+ This chapter covers the fundamental concepts of database systems — what + they are, why they exist, how they compare to file systems, and the + basic architecture of a DBMS. +

+ +
+ +
+

+ What is a Database? +

+
    +
  • A database is an organized collection of related data stored and accessed electronically.
  • +
  • Data represents real-world information — student records, bank transactions, product inventory.
  • +
  • A DBMS (Database Management System) is software that manages and controls access to the database.
  • +
  • Examples of DBMS: MySQL, PostgreSQL, Oracle, MongoDB.
  • +
+
+

Real-world Example

+
{`University DB
+Tables: Students, Courses, Enrollments, Professors
+Student Zubair (ID: 101) is enrolled in DBMS (CS401)
+taught by Prof. Sharma.`}
+
+
+ +
+ +
+

+ File System vs DBMS +

+
    +
  • Before DBMS, data was stored in flat files managed by the OS.
  • +
  • Data Redundancy: the same data repeated in multiple files.
  • +
  • Data Inconsistency: updating one file does not update others.
  • +
  • Data Isolation: data scattered in different formats, hard to access together.
  • +
  • DBMS solves all three by centralizing data and enforcing rules.
  • +
+
+

Exam Tip: Always mention the 3 main problems of file systems — redundancy, inconsistency, and data isolation — when comparing with DBMS.

+
+
+ +
+ +
+

+ Advantages of DBMS +

+
    +
  • Reduced Redundancy: data is stored once and shared.
  • +
  • Data Consistency: changes reflect everywhere automatically.
  • +
  • Data Integrity: constraints ensure data accuracy.
  • +
  • Data Security: access control limits who can read or modify data.
  • +
  • Concurrent Access: multiple users can safely access data at the same time.
  • +
  • Backup and Recovery: DBMS provides tools to recover from failures.
  • +
+
+ +
+ +
+

+ Types of Databases +

+
    +
  • Relational: data in tables with rows and columns. Example: MySQL, PostgreSQL.
  • +
  • Hierarchical: tree-like structure. Example: IBM IMS.
  • +
  • Network: graph structure with multiple parent-child relationships.
  • +
  • Object-Oriented: stores objects like in OOP. Example: db4o.
  • +
  • NoSQL: designed for unstructured data at scale. Example: MongoDB, Redis.
  • +
+
+

Most university syllabi focus on relational databases. NoSQL is mentioned for awareness.

+
+
+ +
+ +
+

+ Database Users +

+
    +
  • End Users: interact with the database through applications.
  • +
  • Application Programmers: write programs to access the database.
  • +
  • DBA (Database Administrator): manages performance, security, and backups.
  • +
  • Data Analysts: query the database to generate reports and insights.
  • +
+
+

Who does what?

+
{`End User   → Uses a form to register for a course
+App Dev    → Writes INSERT INTO enrollments...
+DBA        → Creates tables, grants permissions, monitors performance`}
+
+
+ +
+ +
+

+ Three-Schema Architecture +

+
    +
  • DBMS uses a 3-level architecture to separate storage from how users see data.
  • +
  • Internal Level: how data is physically stored on disk.
  • +
  • Conceptual Level: the logical structure — tables, relationships, constraints.
  • +
  • External Level: what individual users or applications see (views).
  • +
  • This separation is called Data Independence.
  • +
+
+

Physical independence = change storage without changing logic. Logical independence = change logic without changing user views.

+
+
+ +
+ +
+

+ DBMS Languages +

+
    +
  • DDL (Data Definition Language): define structure. Example: CREATE, ALTER, DROP.
  • +
  • DML (Data Manipulation Language): manipulate data. Example: INSERT, UPDATE, DELETE, SELECT.
  • +
  • DCL (Data Control Language): access control. Example: GRANT, REVOKE.
  • +
  • TCL (Transaction Control Language): manage transactions. Example: COMMIT, ROLLBACK.
  • +
+
+

Quick Examples

+
{`DDL: CREATE TABLE students (id INT PRIMARY KEY, name VARCHAR(50));
+DML: INSERT INTO students VALUES (1, 'Zubair');
+DCL: GRANT SELECT ON students TO user1;
+TCL: COMMIT;`}
+
+
+ +
+ +
+

+ DBMS Architecture: 1-Tier, 2-Tier, 3-Tier +

+
    +
  • 1-Tier: database and application on the same machine. Used for personal/local databases.
  • +
  • 2-Tier: client communicates directly with the database server.
  • +
  • 3-Tier: a middle application server sits between client and database. Used in web apps.
  • +
+
+

3-Tier Example

+
{`Client (Browser)
+     ↓  HTTP request
+App Server (Node.js / Spring Boot)
+     ↓  SQL query
+Database Server (MySQL / PostgreSQL)`}
+
+
+
+ ); +}; \ No newline at end of file From f714453fd5acc32e79c750d956bbe3621a62f9e3 Mon Sep 17 00:00:00 2001 From: MD JUBER QURAISHI Date: Sun, 17 May 2026 09:42:12 +0530 Subject: [PATCH 3/3] fix: mark DBMS as available in subjects list --- app/components/subjects.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/subjects.tsx b/app/components/subjects.tsx index 489c3b3..7822008 100644 --- a/app/components/subjects.tsx +++ b/app/components/subjects.tsx @@ -123,7 +123,7 @@ const subjectCodes: Record = { }; // Available subjects -const available = ["ep", "c", "em1", "em2", "oops","os", "ml"]; +const available = ["ep", "c", "em1", "em2", "oops","os", "ml","dbms"]; export default function SubjectsSection() { return (