diff --git a/DBMS/DBMS Structured Notes/01_Introduction.md b/DBMS/DBMS Structured Notes/01_Introduction.md new file mode 100644 index 0000000..6eb23d3 --- /dev/null +++ b/DBMS/DBMS Structured Notes/01_Introduction.md @@ -0,0 +1,11 @@ +# Introduction to DBMS + +## What is a DBMS? +- DBMS stands for **Database Management System**. +- It is software that allows users to create, manage, and manipulate databases. +- Example: MySQL, Oracle, PostgreSQL, MongoDB. + +## Why do we need DBMS? +- To store data efficiently. +- To ensure data consistency and security. +- To provide easy access and sharing of data among multiple users. diff --git a/DBMS/DBMS Structured Notes/02_Types_of_DBMS.md b/DBMS/DBMS Structured Notes/02_Types_of_DBMS.md new file mode 100644 index 0000000..deceb08 --- /dev/null +++ b/DBMS/DBMS Structured Notes/02_Types_of_DBMS.md @@ -0,0 +1,19 @@ +# Types of DBMS + +1. **Hierarchical DBMS** + - Data is organized in a tree-like structure. + - Parent-child relationship. + - Example: IBM Information Management System (IMS). + +2. **Network DBMS** + - Uses a graph structure with nodes and edges. + - Allows many-to-many relationships. + +3. **Relational DBMS (RDBMS)** + - Data is stored in **tables (relations)**. + - Uses SQL to interact with data. + - Example: MySQL, PostgreSQL, Oracle. + +4. **Object-oriented DBMS** + - Stores data as objects (similar to OOP). + - Supports complex data types like multimedia. diff --git a/DBMS/DBMS Structured Notes/03_Key_concepts.md b/DBMS/DBMS Structured Notes/03_Key_concepts.md new file mode 100644 index 0000000..a565144 --- /dev/null +++ b/DBMS/DBMS Structured Notes/03_Key_concepts.md @@ -0,0 +1,7 @@ +# Key Concepts in DBMS + +- **Table**: A collection of rows and columns. +- **Row (Tuple)**: A single record in a table. +- **Column (Attribute)**: A field that defines a property of data. +- **Primary Key**: Uniquely identifies each record in a table. +- **Foreign Key**: Links one table to another. diff --git a/DBMS/DBMS Structured Notes/04_Normalisation.md b/DBMS/DBMS Structured Notes/04_Normalisation.md new file mode 100644 index 0000000..b1df989 --- /dev/null +++ b/DBMS/DBMS Structured Notes/04_Normalisation.md @@ -0,0 +1,11 @@ +# Normalization in DBMS + +## What is Normalization? +- Process of organizing data to reduce redundancy. +- Improves efficiency and avoids anomalies. + +## Forms of Normalization: +- **1NF**: No repeating groups, atomic values. +- **2NF**: 1NF + no partial dependency. +- **3NF**: 2NF + no transitive dependency. +- **BCNF**: Stronger version of 3NF. diff --git a/DBMS/DBMS Structured Notes/05_Acid_properties.md b/DBMS/DBMS Structured Notes/05_Acid_properties.md new file mode 100644 index 0000000..96f17ce --- /dev/null +++ b/DBMS/DBMS Structured Notes/05_Acid_properties.md @@ -0,0 +1,8 @@ +# ACID Properties + +ACID ensures reliable database transactions: + +1. **Atomicity** → All or nothing execution. +2. **Consistency** → Data must remain valid before and after transaction. +3. **Isolation** → Transactions execute independently. +4. **Durability** → Changes remain permanent even after a crash. diff --git a/DBMS/DBMS Structured Notes/06_Transactions.md b/DBMS/DBMS Structured Notes/06_Transactions.md new file mode 100644 index 0000000..6ab6435 --- /dev/null +++ b/DBMS/DBMS Structured Notes/06_Transactions.md @@ -0,0 +1,9 @@ +# Transactions in DBMS + +- A **transaction** is a set of operations performed as a single logical unit. +- Example: Money transfer between accounts. + +## Transaction Commands: +- **COMMIT** → Save changes permanently. +- **ROLLBACK** → Undo changes. +- **SAVEPOINT** → Save a point to rollback partially. diff --git a/DBMS/DBMS Structured Notes/07_SQL_basic_commands.md b/DBMS/DBMS Structured Notes/07_SQL_basic_commands.md new file mode 100644 index 0000000..e5a5e11 --- /dev/null +++ b/DBMS/DBMS Structured Notes/07_SQL_basic_commands.md @@ -0,0 +1,25 @@ +## SELECT +SELECT name, age FROM Students; + +## INSERT +INSERT INTO Students (id, name, age) VALUES (1, 'Shiwans', 20); + +## UPDATE +UPDATE Students SET age = 21 WHERE id = 1; + +## DELETE +DELETE FROM Students WHERE id = 1; + + +## USE CASES OF DBMS ## +- **RDBMS (Relational)** → For structured data (banking, e-commerce). +- **NoSQL DBMS** → For unstructured/large-scale data (social media, big data). + + + + +## Popular DBMS ## + - MySQL + - PostgreSQL + - MongoDB + - SQLite \ No newline at end of file diff --git a/DBMS/DBMS Structured Notes/08_README.md b/DBMS/DBMS Structured Notes/08_README.md new file mode 100644 index 0000000..f009943 --- /dev/null +++ b/DBMS/DBMS Structured Notes/08_README.md @@ -0,0 +1,16 @@ +# DBMS Notes by Shiwans + +This folder contains beginner-friendly notes on **Database Management Systems (DBMS)**. + +## Index +1. [Introduction](01_Introduction.md) +2. [Types of DBMS](02_Types_of_DBMS.md) +3. [Key Concepts](03_Key_Concepts.md) +4. [Normalization](04_Normalization.md) +5. [ACID Properties](05_ACID_Properties.md) +6. [Transactions](06_Transactions.md) +7. [SQL Basic Commands](07_SQL_basic_commands.md) +8. [README](08_README.md) + +--- +> ✨ Contribution by **Shiwans Kumar Yadav**