0% found this document useful (0 votes)
4 views2 pages

OpenEndedLab - Database Management System

The document outlines an Open-Ended Lab (OEL) for a Database Management Systems course, requiring students to design and implement a relational database for a Student Internship System using SQL Server Management Studio. Students must create tables for students, companies, internships, and applications, insert sample data, write specific queries, perform aggregations, create a view, and implement a transaction. The lab emphasizes understanding of database schema design, data manipulation, and transaction control, with a duration of 1.5 hours and guidance from Rabbiya Younas.

Uploaded by

zammalik927
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

OpenEndedLab - Database Management System

The document outlines an Open-Ended Lab (OEL) for a Database Management Systems course, requiring students to design and implement a relational database for a Student Internship System using SQL Server Management Studio. Students must create tables for students, companies, internships, and applications, insert sample data, write specific queries, perform aggregations, create a view, and implement a transaction. The lab emphasizes understanding of database schema design, data manipulation, and transaction control, with a duration of 1.5 hours and guidance from Rabbiya Younas.

Uploaded by

zammalik927
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Open-Ended Lab (OEL) – Database Management Systems Lab

Environment: SQL Server Management Studio (SSMS)

Duration: 1.5 Hours

Instructions: Rabbiya Younas

You are required to design, implement, and query a relational database system based on the
case study provided below. This lab is open-ended, so demonstrate your understanding of
database schema design, data insertion, query writing, and transaction control.

- Chatgpt and internet is allowed


- You should be able to make modifications when required during viva [Without internet]
- Create Complete Report along the way

Case Study: Student Internship System

The university’s career office wants a database system to manage student internship
applications. You are tasked with designing and building this database. Your system should
be capable of storing and managing:

• Students
• Companies
• Internship opportunities
• Applications from students for internships

Requirements and Tasks

1. Design & Create Tables (DDL)

Design and create the following tables with appropriate data types, primary keys, and
foreign key relationships:

• Students: StudentID, Name, Program, CGPA


• Companies: CompanyID, Name, Location
• Internships: InternshipID, Title, Stipend, CompanyID (linked to Companies)
• Applications: AppID, StudentID, InternshipID, Status (Applied/Selected/Rejected),
DateApplied

Use CREATE TABLE, PRIMARY KEY, and FOREIGN KEY constraints.


2. Insert Sample Data

Insert at least 3 to 5 meaningful rows in each of the created tables using INSERT INTO.

3. Write the Following Queries

a. List all students who have applied for internships with a stipend above 15,000
b. Show the number of applications received for each internship title
c. Display the average stipend per company
d. Find students who haven’t applied for any internship
e. Display names of selected students along with their internship title and company name

4. Perform Aggregation

• Show how many students applied for internships at each company


• Show the CGPA-wise count of selected students

5. Create a View –

Create a view that shows the following information:


Student Name, Internship Title, Company Name, Application
Status

6. Implement a Transaction –

Perform the following updates inside a single transaction block:

• Update a student's CGPA


• Update their application status to “Selected”

Use BEGIN TRANSACTION, COMMIT, and ROLLBACK appropriately.

--------------------------------------------- Best Of Luck -----------------------------------------------

You might also like