Lab Report-01DB

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Green University of Bangladesh

Department of Computer Science and Engineering (CSE)


Faculty of Sciences and Engineering
Semester: (Fall, Year:2023), B.Sc. in CSE (Day)

Lab Report NO: 01


Course Title: Database System Lab
Course Code: CSE 210 Section: 213-D1

Lab Task Name: Managing MySQL Databases and Tables in MySQL

Student Details

Name ID

1. Irteja Mahmud 213902016

Lab Date : 03/10/2023


Submission Date : 09/10/2023
Course Teacher’s Name : Feroza Naznin

Lab Report Status


Marks: ………………………………… Signature:.....................
Comments:.............................................. Date:..............................
1. TITLE OF THE LAB REPORT EXPERIMENT
Managing MySQL Databases and Tables in MySQL

2. OBJECTIVES/AIM
The main objective of this lab report is the create database, drop database. Create &
drop table, insert & update the value into the table, add new column, change the
datatype of column, delete column. Also get know about primary key and composite
key. Actually, in this lab report we will get to know about DDL & DML query
language.

3. PROCEDURE / ANALYSIS / DESIGN

Figure 1: ER Diagram of students table


4. IMPLEMENTATION

Creating Database:

Creating students table into university database:

Delete Teacher Table From University database:

Inserting Data into the students table:

Showing All data from students table:

Updating a specific information using condition:


Adding a new column into the students table:

Creating a new teacher table where there are a composite key:

Changing the column name :

Modifying the data type of CGPA column :

Updating the Mobile_no

Showing the Name And Phone Number Form students table:

Deleting the recode from students table:


5. TEST RESULT / OUTPUT
After Creating students table:

After Inserting the data into the table and showing them:

Added new column into the table:


Changed column name Phone_no to Mobile_no:

Changed column datatype double to float:

Teacher Table with composite key:


6. ANALYSIS AND DISCUSSION
This lab report aims to provide a comprehensive introduction to SQL database
management, covering both Data Definition Language (DDL) and Data
Manipulation Language (DML) queries. By learning how to create, manipulate, and
maintain databases and tables, as well as work with data, the report offers a
foundational understanding of SQL, which is crucial for anyone aspiring to work
with databases.

The knowledge gained from this lab report is essential for tasks related to database
administration and development. Creating, altering, and dropping databases and
tables are fundamental operations, while data manipulation and column management
are necessary for maintaining data integrity and flexibility. Understanding primary
and composite keys is pivotal in designing efficient database structures.

7. SUMMARY
This lab report provides a solid foundation for anyone looking to work with
databases, equipping them with the necessary skills to perform a wide range of
database-related tasks using SQL.

You might also like