Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/components/subjects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const subjectCodes: Record<string, string> = {
};

// Available subjects
const available = ["ep", "c", "em1", "em2", "oops", "dsc", "coa", "os", "ml", "dops", "cd", "cle","ec"];
const available = ["ep", "c", "em1", "em2", "oops", "dsc", "coa", "os", "ml", "dops", "cd", "cle","ec","dbms"];

export default function SubjectsSection() {
return (
Expand Down
52 changes: 35 additions & 17 deletions app/sem4/dbms/[chapter]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { Ch1Content } from "../content/chapter1";
import { Ch2Content } from "../content/chapter2";
import { Ch3Content } from "../content/chapter3";
import BookmarkButton from "../../../components/BookmarkButton";
// import { Ch4Content } from "../content/chapter4";
// import { Ch5Content } from "../content/chapter5";
// import { Ch6Content } from "../content/chapter6";
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";

Expand All @@ -24,19 +24,28 @@ const chapters = [
{ 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: "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 };
params: Promise<{ chapter: string }>;
};

export default function ChapterPage({ params }: ChapterProps) {
const currentIndex = chapters.findIndex((c) => c.id === params.chapter);
export default async function ChapterPage({ params }: ChapterProps) {
const { chapter: chapterId } = await params;
const currentIndex = chapters.findIndex((c) => c.id === chapterId);
const chapter = chapters[currentIndex];

if (!chapter) {
Expand All @@ -45,7 +54,8 @@ export default function ChapterPage({ params }: ChapterProps) {

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

return (
<div className="flex flex-col bg-[#1B0D00] min-h-full p-2 pt-6 text-[#e2d1c1]">
Expand All @@ -58,7 +68,7 @@ export default function ChapterPage({ params }: ChapterProps) {
<p className={`text-2xl mt-[-8px] ${righteous.className}`}>
{chapter.title}
</p>
<BookmarkButton title={`DBMS: ${chapter.title}`} />
<BookmarkButton title={`DBMS: ${chapter.title}`} />
</div>

<div className="flex justify-between mt-3">
Expand All @@ -71,7 +81,9 @@ export default function ChapterPage({ params }: ChapterProps) {
<ArrowBigLeft className="inline-block mr-1" />
Previous
</Link>
) : <div />}
) : (
<div />
)}

{nextChapter ? (
<Link
Expand All @@ -82,7 +94,9 @@ export default function ChapterPage({ params }: ChapterProps) {
Next
<ArrowBigRight className="inline-block ml-1" />
</Link>
) : <div />}
) : (
<div />
)}
</div>

<hr className="my-6 border-t-3" />
Expand All @@ -100,7 +114,9 @@ export default function ChapterPage({ params }: ChapterProps) {
<ArrowBigLeft className="inline-block mr-1" />
{prevChapter.title}
</Link>
) : <div />}
) : (
<div />
)}

{nextChapter ? (
<Link
Expand All @@ -111,8 +127,10 @@ export default function ChapterPage({ params }: ChapterProps) {
{nextChapter.title}
<ArrowBigRight className="inline-block ml-1" />
</Link>
) : <div />}
) : (
<div />
)}
</div>
</div>
);
}
}
6 changes: 3 additions & 3 deletions app/sem4/dbms/components/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export default function Sidebar() {
{ 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: "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" },
];
Expand Down
66 changes: 40 additions & 26 deletions app/sem4/dbms/content/chapter0.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ export const Ch0Content = () => {
</h3>
<ul className="section-list">
<li>What is a database and why we need it</li>
<li>File system vs database approach</li>
<li>File system vs database approach — comparison table</li>
<li>Advantages of DBMS over file systems</li>
<li>Types of databases: relational, hierarchical, network, object-oriented</li>
<li>Database users: end users, application programmers, DBA</li>
<li>DBMS architecture: 1-tier, 2-tier, 3-tier</li>
<li>Types of databases: relational, hierarchical, network, object-oriented, object-relational</li>
<li>Data models: relational, ER, object-based, network, hierarchical</li>
<li>Database users: naïve, sophisticated, application programmers, DBA, designers</li>
<li>DBMS architecture: 1-tier, 2-tier, 3-tier; three-schema (external/conceptual/internal)</li>
<li>Structure of DBMS: query processor, storage manager, disk storage components</li>
<li>Database design steps: requirements → conceptual → logical → schema refinement → physical → security</li>
</ul>
</section>

Expand All @@ -31,12 +34,14 @@ export const Ch0Content = () => {
Module II: <span className="section-subheading">Entity-Relationship Model</span>
</h3>
<ul className="section-list">
<li>Entities, attributes, and relationships</li>
<li>Types of attributes: simple, composite, multivalued, derived</li>
<li>Entities, attributes, and relationships — ER diagram notation</li>
<li>Types of attributes: simple, composite, multivalued, derived, single-valued</li>
<li>Cardinality: one-to-one, one-to-many, many-to-many</li>
<li>Participation constraints: total and partial</li>
<li>ER diagram notation and conventions</li>
<li>Extended ER features: specialization, generalization, aggregation</li>
<li>Strong vs weak entities; identifying relationships</li>
<li>Relationship types: binary, recursive (unary), ternary</li>
<li>Extended ER: ISA hierarchies, specialization, generalization, aggregation</li>
<li>Conceptual design choices: entity vs attribute, entity vs relationship, binary vs ternary</li>
</ul>
</section>

Expand All @@ -47,28 +52,33 @@ export const Ch0Content = () => {
Module III: <span className="section-subheading">Relational Model and SQL</span>
</h3>
<ul className="section-list">
<li>Relational model: tables, tuples, attributes, domains</li>
<li>Keys: primary, candidate, foreign, super key</li>
<li>Relational algebra operations</li>
<li>SQL basics: DDL, DML, DCL, TCL</li>
<li>Joins: inner, outer, natural, cross</li>
<li>Subqueries, views, and aggregation functions</li>
<li>Relational model: tables, tuples, attributes, domains, cardinality, degree</li>
<li>Keys: primary, candidate, foreign, super, composite, alternate, unique</li>
<li>Integrity constraints: domain, entity, referential, key constraints (NULL, NOT NULL, CHECK)</li>
<li>SQL data types: string (CHAR, VARCHAR), numeric (INT, FLOAT, DECIMAL), date/time</li>
<li>DDL: CREATE, ALTER, DROP, TRUNCATE — DML: SELECT, INSERT, UPDATE, DELETE</li>
<li>Querying: WHERE, ORDER BY, GROUP BY, HAVING, LIMIT</li>
<li>Joins: inner, outer (left/right/full), natural, cross</li>
<li>Relational algebra: σ, π, ∪, ∩, −, ×, ⋈</li>
<li>Subqueries, views — creating, using, and destroying</li>
<li>Foreign key violation handling: CASCADE, SET NULL, SET DEFAULT, NO ACTION</li>
<li>Transactions and constraints: DEFERRED vs IMMEDIATE constraint checking</li>
</ul>
</section>

<hr className="my-6 border-[#c7a669] opacity-40" />

<section>
<h3 className="section-heading">
Module IV: <span className="section-subheading">Normalization</span>
Module IV: <span className="section-subheading">Normalization / Schema Refinement</span>
</h3>
<ul className="section-list">
<li>Functional dependencies and their types</li>
<li>Anomalies: insertion, deletion, update</li>
<li>Functional dependencies: full, partial, transitive; Armstrong's axioms</li>
<li>Normal forms: 1NF, 2NF, 3NF, BCNF</li>
<li>Decomposition: lossless join and dependency preservation</li>
<li>Multivalued dependencies and 4NF</li>
<li>Practical approach to normalization</li>
<li>Multi-valued dependencies and 4NF</li>
<li>Join dependencies and 5NF (Project-Join Normal Form)</li>
</ul>
</section>

Expand All @@ -80,17 +90,21 @@ export const Ch0Content = () => {
</h3>
<ul className="section-list">
<li>Transaction concept and ACID properties</li>
<li>Transaction states: active, partially committed, committed, failed, aborted</li>
<li>Concurrency problems: lost update, dirty read, unrepeatable read</li>
<li>Concurrency control techniques: locking, timestamps</li>
<li>Two-phase locking protocol</li>
<li>Deadlock detection and recovery</li>
<li>Transaction states: active → partially committed → committed / failed → aborted → terminated</li>
<li>Schedules: serial, non-serial, serializable (conflict and view)</li>
<li>Recoverability: irrecoverable, recoverable, cascadeless, strict schedules</li>
<li>Isolation levels: read uncommitted, read committed, repeatable read, serializable</li>
<li>Lock-based protocols: simplistic, pre-claiming, 2PL, strict-2PL</li>
<li>Timestamp-based protocols: basic TO, Thomas's write rule</li>
<li>Validation-based protocol; multiple granularity and intention locks</li>
<li>Recovery: log-based (deferred/immediate), checkpoints, ARIES algorithm</li>
<li>Database backup: full, incremental, differential</li>
</ul>
</section>

<hr className="my-6 border-[#c7a669] opacity-40" />

<section>
<section>
<h3 className="section-heading">
Module VI: <span className="section-subheading">Indexing and Hashing</span>
</h3>
Expand Down Expand Up @@ -141,9 +155,9 @@ export const Ch0Content = () => {
<p className="p-text">
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
handle concurrency and recovery — providing a strong foundation for
real-world database development and system design.
</p>
</div>
);
};
};
Loading