Skip to content

sadiapeerzada/DBMS-Lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

DBMS-Lab

๐Ÿ—„๏ธ DBMS Laboratory โ€” B.Sc. (Hons.) Computer Application IV Semester

AMU Course Credits Semester Session

"When a nation becomes devoid of art and learning, it invites poverty and when poverty comes it brings in its wake thousands of crimes." โ€” Sir Syed Ahmad Khan


๐Ÿ“‹ Table of Contents


๐Ÿ“– About the Course

This laboratory course is designed for B.Sc. (Computer Application) IV Semester students to develop hands-on expertise in Database Management Systems (DBMS). The course covers the full spectrum from ER diagram design to advanced PL/SQL programming including stored procedures, cursors, and triggers.

Students work with industry-standard tools โ€” Oracle Express Edition and MySQL โ€” to simulate real-world database design and management scenarios.


๐Ÿ“Œ Course Details

Field Details
Course Title Laboratory Course-IV
Course Code CABSMJ4P04
Programme B.Sc. (Hons.) Computer Application
Semester IV
Credits 02
Periods Per Week 03
Department Computer Science, AMU Aligarh
Edition Revised โ€” January 2026

๐ŸŽฏ Course Objectives

  • Design Entity-Relationship (ER) diagrams and Schema diagrams
  • Create fully-fledged databases from ER diagrams
  • Write DDL, DML, and DCL SQL queries
  • Implement PL/SQL blocks, Cursors, Triggers, Procedures, and Functions

โœ… Course Outcomes

After completing this course, students will be able to:

  • Understand Relational and Object-Relational DBMS concepts
  • Comprehend query languages and their practical usage
  • Identify logical entities and their relationships
  • Draw ER diagrams for any real-world system
  • Create cursors, functions, procedures, triggers, and other database objects

๐Ÿ“Š Assessment Scheme

Total Marks: 100
โ”œโ”€โ”€ Continuous Assessment  โ†’  60 Marks
โ”‚   โ”œโ”€โ”€ Sessional I        โ†’  30 Marks
โ”‚   โ”‚   โ”œโ”€โ”€ Lab Report (signed)   โ†’  20 Marks
โ”‚   โ”‚   โ”œโ”€โ”€ Lab Question (in-lab) โ†’   5 Marks
โ”‚   โ”‚   โ””โ”€โ”€ Viva Voce             โ†’   5 Marks
โ”‚   โ””โ”€โ”€ Sessional II       โ†’  30 Marks
โ”‚       โ”œโ”€โ”€ Lab Report (signed)   โ†’  20 Marks
โ”‚       โ”œโ”€โ”€ Lab Question (in-lab) โ†’   5 Marks
โ”‚       โ””โ”€โ”€ Viva Voce             โ†’   5 Marks
โ””โ”€โ”€ Final Lab Examination   โ†’  40 Marks

โš ๏ธ Minimum Requirement: At least 10 timely completed and duly signed weekly assignments are compulsory to appear in the Final Lab Examination.


๐Ÿ“… Weekly Lab Index

Week 1 โ€” DBMS Basics & Tool Installation

Objectives: Learn basics of DBMS types; install and access Oracle XE and MySQL.

# Problem
1 Write a step-by-step report for MySQL installation (modelled after the Oracle XE installation guide)

Tools: Oracle Database 21c Express Edition, MySQL Community Server


Week 2 โ€” ER Diagram & Schema Design (Basic)

Objectives: Design ER diagrams and schema diagrams for a given scenario.

# Problem
1 Design ER diagram and Schema for AMU Computer Science Laboratory (Students, Instructors, Computer Systems, Lab Sessions)

Entities: Student ยท Lab Instructor ยท Computer System ยท Lab Session


Week 3 โ€” ER Diagram, Schema & Database Design

Objectives: Design ER diagrams and construct databases using automated tools.

# Problem
1 Design ER diagram, schema, and database for a Car Dealership system (sales, customers, service facility, mechanics, parts)

Entities: Salesperson ยท Customer ยท Car ยท Invoice ยท ServiceTicket ยท Mechanic ยท Parts


Week 4 โ€” Table Creation & Data Insertion (DDL/DML)

Objectives: Create tables, insert records, understand table concepts.

# Problem
1 Create and populate CLIENT_MASTER, PRODUCT_MASTER, and SALESMAN_MASTER tables with full datasets

Tables Created:

CLIENT_MASTER    โ†’ ClientNo, Name, City, PinCode, State, BalDue
PRODUCT_MASTER   โ†’ ProductNo, Description, ProfitPercent, UnitMeasure, QtyOnHand, ReorderLvl, SellPrice, CostPrice
SALESMAN_MASTER  โ†’ SalesmanNo, SalesmanName, Address1, Address2, City, PinCode, State, SalAmt

Week 5 โ€” Querying, Updating, Deleting & Altering Tables

Objectives: Write queries for retrieval, update, delete; alter and rename tables.

# Operations Covered
1 Backup ยท SELECT queries ยท UPDATE records ยท DELETE records ยท ALTER TABLE ยท DROP TABLE ยท RENAME TABLE

Key Operations:

-- Sample queries practiced this week
SELECT name, city FROM CLIENT_MASTER;
UPDATE CLIENT_MASTER SET city = 'Bangalore' WHERE clientno = 'C00005';
DELETE FROM SALESMAN_MASTER WHERE salamt = 3500;
ALTER TABLE CLIENT_MASTER ADD telephone NUMBER(10);
DROP TABLE CLIENT_MASTER;
RENAME SALESMAN_MASTER TO sman_mast;

Week 6 โ€” Hospital Management Database (DDL/DML)

Objectives: Design and implement a real-world hospital database.

# Problem
1 Create Hospital_DB with Patient, Doctor, and Appointment tables; insert records; perform queries
2 Write advanced SQL queries โ€” UPDATE, DELETE, ALTER, RENAME on Hospital_DB

Schema:

Patient      (Patient_ID PK, Patient_Name, Age, Gender, Contact_No)
Doctor       (Doctor_ID PK, Doctor_Name, Specialization, Room_No)
Appointment  (Appointment_ID PK, Patient_ID FK, Doctor_ID FK, Appointment_Date, Appointment_Time)

Test Coverage: 11 test cases including FK constraint violation checks


Week 7 โ€” Constraints, Joins & Complex Queries

Objectives: Create tables with constraints; write advanced queries using joins.

# Problem
1 Insurance Database โ€” PERSON, CAR, ACCIDENT, OWNS, PARTICIPATED tables with PKs, FKs
2 Banking Database โ€” BRANCH, ACCOUNT, DEPOSITOR, CUSTOMER, LOAN, BORROWER tables with ER diagram

Sample Queries:

-- Find total people who owned cars involved in accidents (2008-2020)
-- Find customers with at least two accounts at Aligarh branch
-- Find customers with balance > 100000

Week 8 โ€” Library Database with Full Constraint Application

Objectives: Apply NOT NULL, UNIQUE, CHECK, PRIMARY KEY, FOREIGN KEY constraints.

# Problem
1 College Library Database โ€” Student, Book, Issue tables with all constraint types

Constraints Demonstrated:

Student  โ†’ PRIMARY KEY, NOT NULL, UNIQUE (Mobile_No)
Book     โ†’ PRIMARY KEY, NOT NULL, CHECK (Price > 0)
Issue    โ†’ PRIMARY KEY, FOREIGN KEY (Student_ID), FOREIGN KEY (Book_ID), NOT NULL

Includes: Constraint violation test cases (duplicate mobile, negative price, invalid FK)


Week 9 โ€” Sales Information System

Objectives: Design a sales database; write complex retrieval queries.

# Problem
1 Full Sales System โ€” Product, Client, Order, Salesman tables with ER + Schema + SQL queries

Key Queries Practiced:

-- LIKE patterns: Find clients with 'a' as second letter
SELECT * FROM CLIENT WHERE client_name LIKE '_a%';

-- Sorted product listing by selling price
SELECT * FROM PRODUCT WHERE sell_price <= 5000 ORDER BY sell_price;

Week 10 โ€” Mobile Phone Service Center Database

Objectives: Design service-center database; implement JOINs and FK relationships.

# Problem
1 Mobile Service Center โ€” Customer, Mobile, Service_Request tables; 13 test cases

Test Coverage: Table creation ยท INSERT ยท SELECT ยท JOIN ยท FK violation ยท multiple records per entity


Week 11 โ€” Inter-University Database

Objectives: Build a complex multi-entity database; create secondary indexes; write advanced queries.

# Problem
1 Inter-University DB โ€” University, Department, Program, Course, Syllabus, Faculty tables

Complex Queries (10):

i.   Universities in Mumbai
ii.  Programs run by AMU
iii. Departments of JNU
iv.  Programs of University of Jammu
v.   Universities offering "MCA"
vi.  MCA Courses at AMU
vii. Faculty specializing in "Information Security"
viii.Syllabus of "Computer Architecture" across universities
ix.  CS Faculty of Delhi University
x.   University with maximum programs

Week 12 โ€” PL/SQL Stored Procedures & Functions

Objectives: Write PL/SQL stored procedures and functions.

# Problem
1 Stored procedure to display "Hello World"
2 Procedure to calculate sum of digits at even positions of a number
3 Procedure to count prime and composite numbers
4 Function to compare three numbers and display in ascending/descending order
5 Function for arithmetic operations (Add, Subtract, Multiply, Divide)

PL/SQL Template:

CREATE OR REPLACE PROCEDURE hello_world AS
BEGIN
    DBMS_OUTPUT.PUT_LINE('Hello World');
END;
/

๐Ÿ› ๏ธ Tech Stack

Tool Purpose
Oracle Primary RDBMS
MySQL Open-source RDBMS
SQL DDL ยท DML ยท DCL ยท TCL
PL/SQL Procedures ยท Functions ยท Cursors ยท Triggers

Deliverables per exercise (teacher-signed):

  • ER Diagram and Schema Diagram (for Weeks 3, 7โ€“8, 9โ€“10, 11)
  • SQL / PL/SQL query with screenshot output

๐Ÿ“ Lab File Format

Lab File Index Template
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Week No. โ”‚ Problems with Description โ”‚ Page No. โ”‚ Teacher Signature & Date
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
   1     โ”‚ 1#, 2#, 3#                โ”‚          โ”‚
   2     โ”‚ 1#, 2#, 3#                โ”‚          โ”‚
  ...    โ”‚ ...                       โ”‚          โ”‚
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Header: Page Number
Footer: Roll Number & Name

๐Ÿ›๏ธ Department Info

Field Details
Department Department of Computer Science
University Aligarh Muslim University, Aligarh (U.P.) India
Lab Manual Edition Revised โ€” January 2026
Chairperson Prof. Arman Rasool Faridi
Design & Compilation Dr. Faisal Anwer ยท Dr. Faraz Masood ยท Dr. Mohammad Luqman

Department of Computer Science ยท Aligarh Muslim University

Lab Manual CABSMJ4P04 ยท Revised Edition January 2026

About

A collection of lab assignments and practice programs from my B.Sc. Computer Science DBMS coursework.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

โšก