"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
- About the Course
- Course Details
- Assessment Scheme
- Weekly Lab Index
- Tech Stack
- Lab File Format
- Department Info
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.
| 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 |
- 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
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
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.
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
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
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
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, SalAmtObjectives: 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;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
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 > 100000Objectives: 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 NULLIncludes: Constraint violation test cases (duplicate mobile, negative price, invalid FK)
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;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
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
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;
/| Tool | Purpose |
|---|---|
| Primary RDBMS | |
| 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 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
| 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