0% found this document useful (0 votes)
22 views

DTABASE Lab Assignment no 1

This document outlines the first lab assignment for the Database Systems course, focusing on creating and modifying a database and its tables. Students are required to complete tasks involving SQL queries in MySQL Workbench, including creating a database, modifying table structures, and deleting data. The assignment is due on March 20, 2025, and requires a summary of the student's experience with Data Definition Language (DDL).

Uploaded by

businessfluid69
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)
22 views

DTABASE Lab Assignment no 1

This document outlines the first lab assignment for the Database Systems course, focusing on creating and modifying a database and its tables. Students are required to complete tasks involving SQL queries in MySQL Workbench, including creating a database, modifying table structures, and deleting data. The assignment is due on March 20, 2025, and requires a summary of the student's experience with Data Definition Language (DDL).

Uploaded by

businessfluid69
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

Database Systems Lab Assignment

Lab No: 1

Course: Database Systems Lab

Semester: 2nd

Total Marks: 10

Due Date: 20th March 2025

Instructor: Eman Khattak

Submission Instructions
1. Write all SQL queries in MySQL Workbench and copy them into a PDF document.

2. Run the queries in MySQL and take screenshots of the outputs.

3. Mention your Name, Student ID, Section, and Semester at the beginning of your submission.

Task 1: Creating a Database and Tables


1. Create a database named UniversityDB and use it.

2. Create a table named Students with the following columns:

a. StudentID (Primary Key, Auto Increment)

b. FirstName (Not Null)

c. LastName (Not Null)

d. Age (Not Null)

e. Department

Task 2: Modifying the Table Structure


1. Add a new column Email with a unique constraint.

2. Modify the Age column to accept values only between 18 and 30.

3. Rename the Department column to Major.

Task 3: Deleting Data and Dropping Tables


1. Remove all records from the Students table while keeping the structure intact.

2. Drop the Students table permanently.

3. Drop the entire UniversityDB database.


Conclusion
1. Summarize your experience with the assignment and what you learned about DDL (Data Definition Lang

You might also like