Digital University Kerala

SQL Lab Notes

PostgreSQL for Data Analytics

Course Instructor:Dr. Ajith Kumar
Academic Year: 2026-2028
📒 Class Notes · Database Architecture and Analytics (M4220152)

Class Notes

Module by module, following the syllabus

Each module explains the theory from the lecture notes in plain language. Every concept is then shown on the same database we use in the lab, university_lab, so you can run every example yourself.

How each topic is laid out

📖 Definition

The short, exam-ready definition.

Explanation

The idea in plain language, with diagrams and comparison tables.

🏫 Example

The concept shown on university_lab, with real output.

✅ Remember

Three or four revision points.

Each module ends with a one-page summary, practice exercises on university_lab, and exam-style questions.

Course outcomes

Database Architecture and Analytics (M4220152) carries 4 credits, split 3-1-0-0 (lecture-lab-seminar-project). By the end of the course you should be able to:

OutcomeWhat you should be able to doCovered in
CO1Summarize the basic concepts and applications of Database Management System.Module 1
CO2Design Entity – Relationship diagram and convert into the corresponding logical schema.Module 2
CO3Write SQL queries based on the given requirements and get practical knowledge on data modeling, data manipulation and data retrieval.Module 3
CO4Summarize the architecture and features of distributed databases and get the knowledge on distributed databases and understanding on handling unstructured data.Module 4A, Module 4B

Modules

Module 1 · CO1Lab 1

Introduction to DBMS

  • ▸ Data, Information, Database
  • ▸ File Server Model, Client Server Model
  • ▸ Components of DBMS, DBMS Features
  • ▸ Transaction and ACID properties
  • ▸ Data Abstraction and Data Independence
Read Module 1
Module 2 · CO2Lab 2, Lab 3, Lab 5

Data Modeling

  • ▸ Logical and Physical Data Models
  • ▸ E-R Modeling – a detailed study
  • ▸ Record-based Models
  • ▸ Relational Model – overview and concepts
  • ▸ Tables, Keys, Constraints
  • ▸ Data Integrity and Integrity Rules
  • ▸ Database Objects – Schema and Non-schema
  • ▸ Functional Dependency
  • ▸ Database Normalization
  • ▸ Codd's Rules
Read Module 2
Module 3 · CO3Lab 1, Lab 3, Lab 4

Introduction to SQL

  • ▸ SQL Features, Operators and Data Types
  • ▸ SQL Parsing
  • ▸ Types of SQL Commands
  • ▸ Querying Data from the Database
  • ▸ Correlated Sub-queries
  • ▸ Joins
  • ▸ Hierarchical Queries
  • ▸ Bind Variables and Cursors
  • ▸ Views, Functions, Stored Procedures and Triggers
Read Module 3
Module 4A · CO4Lab 6, Lab 7

Distributed Databases

  • ▸ Architectures for Parallel Databases
  • ▸ Parallel Query Evaluation; Parallelizing Individual Operations
  • ▸ Distributed Database Concepts
  • ▸ Fragmentation, Replication and Allocation
  • ▸ Query Processing in Distributed Databases
  • ▸ Concurrency Control and Recovery
Read Module 4A
Module 4B · CO4Lab 8, Lab 9

NoSQL

  • ▸ The Emergence and Relevance of NoSQL
  • ▸ Types of NoSQL Databases
  • ▸ MongoDB, Cassandra, HBase, Neo4j – use and deployment
  • ▸ Applications of NoSQL
Read Module 4B

The class database: university_lab

All examples run on the inter schema of university_lab, the database shared in class. Restore it and load the sample rows once, and you can run every example yourself.

Lab sessions in the syllabus

LabActivityModule
Lab 1Intro to DBMS, installing PostgreSQL, basic SELECT / INSERT / UPDATE / DELETEModule 1
Lab 2E-R diagrams and converting them to a relational schemaModule 2
Lab 3Tables with keys and constraints; queries for data retrievalModule 2
Lab 4SQL operators and functions; complex queries with JOINsModule 3
Lab 5Normalizing tables; designing a well-structured schemaModule 2
Lab 6Distributed databases: query processing and performanceModule 4A
Lab 7Concurrency control and recoveryModule 4A
Lab 8NoSQL: MongoDB, Cassandra and HBase – setup and CRUDModule 4B
Lab 9NoSQL: Neo4j – creating and querying a graph databaseModule 4B