Skip to content

akashdip2001/PostgreSQL

Repository files navigation

PostgreSQL

A comprehensive PostgreSQL Notes document.

  1. Section 0 → Index (Induction / Table of Contents)
  2. Section 1 → Database Fundamentals
  3. Section 2 → CRUD Operations
  4. Section 3 → Data Types & Constraints
  5. Section 4 → Clauses (WHERE, ORDER BY, LIKE, etc.)
  6. Section 5 → Aggregations & Grouping
  7. Section 6 → String Functions & Exercises
  8. Section 7 → Altering Tables & Constraints
  9. Section 8 → Relationships & Joins
  10. Section 9 → Advanced SQL (Views, Stored Procedures, CTEs, Triggers, etc.)
  11. Final → Consolidated exercises & summary


🧭 PostgreSQL Complete Notes

From Zero to Hero


📚 Table of Contents

🏁 Section 1 — Introduction to Databases

  1. What is a Database?
  2. Database vs DBMS vs RDBMS
  3. Types of Databases
  4. SQL vs PostgreSQL
  5. Installing PostgreSQL

🧩 Section 2 — Working with Databases & Tables

  1. Creating, Connecting, Listing, and Dropping Databases
  2. CRUD Operations (Create, Read, Update, Delete)
  3. Creating and Describing Tables
  4. Inserting Data
  5. Selecting (Reading) Data
  6. Updating and Deleting Records

⚙️ Section 3 — Data Types and Constraints

  1. PostgreSQL Data Types
  2. Constraints (Primary Key, Not Null, Default, Serial, Unique)
  3. Table Creation Example with Constraints
  4. Exercises on Constraints

🔍 Section 4 — Clauses and Operators

  1. WHERE Clause
  2. Logical Operators (AND, OR, IN, NOT IN, BETWEEN)
  3. DISTINCT, ORDER BY, LIMIT, LIKE
  4. Practice Queries

📊 Section 5 — Aggregate Functions and Grouping

  1. COUNT, SUM, AVG, MIN, MAX
  2. GROUP BY and HAVING
  3. Exercises

🧵 Section 6 — String Functions

  1. CONCAT, CONCAT_WS
  2. SUBSTRING, LEFT, RIGHT
  3. LENGTH, UPPER, LOWER
  4. TRIM, REPLACE, POSITION
  5. Practice Tasks

🧱 Section 7 — Altering Tables and Constraints

  1. ALTER TABLE – Add / Drop Columns
  2. RENAME Table / Column
  3. Modify Data Type / Default Values
  4. Add NOT NULL and CHECK Constraints
  5. Named Constraints
  6. Exercises

🧩 Section 8 — Relationships and Joins

  1. Understanding Relationships (1:1, 1:N, N:M)
  2. Foreign Keys and References
  3. JOIN Types (INNER, LEFT, RIGHT, CROSS)
  4. Practical Examples (Customers, Orders, Products)
  5. Exercises

🚀 Section 9 — Advanced SQL Concepts

  1. Views
  2. HAVING Clause and ROLLUP
  3. Stored Procedures and Functions
  4. Window Functions (ROW_NUMBER, RANK, etc.)
  5. CTE (Common Table Expressions)
  6. Triggers
  7. CASCADE and Delete Behavior

🧠 Final — Summary and Practice Set

  • Full practice tasks
  • Combined example database
  • Revision notes

Releases

No releases published

Packages

No packages published