You are on page 1of 6

Pak-Austria Fachhochschule

Institude of Applied sciences And Technology

Name: Daniyal Gul


Lab instructor: Yousra Rehman

Registration #

B22F0893SE079 Department: IT and Cs (Software

engineering-22)

Section Blue Lab Report # 01 (Database System lab)

Submitted Date: 19th January ,


2024.

Environment Setup :

1. Install XAMPP :

a. Download and install XAMPP.

b. Choose components like Apache and MySQL during installation.

1
Pak-Austria Fachhochschule
Institude of Applied sciences And Technology

2
Pak-Austria Fachhochschule
Institude of Applied sciences And Technology

2. Start XAMPP:

a. Open XAMPP Control Panel.

b. Start Apache and MySQL services.

3. Access MySQL :

 Go to http://localhost/phpmyadmin/ or use MySQL Workbench.

3
Pak-Austria Fachhochschule
Institude of Applied sciences And Technology

4. Connect MySQL Workbench :

a. Download and install MySQL Workbench.

b. Open MySQL Workbench and create a new connection with your MySQL
serverdetails.

5. Establish Connection :

 Double-click the connection in MySQL Workbench to connect.

6. Test Environment :

 Create a sample table or execute a query to ensure everything works.

MySQL code :

4
Pak-Austria Fachhochschule
Institude of Applied sciences And Technology
Queries :

To show tables :

select * from customer_t;

Display Specific Column in a table :

select customercity from customer_t;

To select specific columns from table :

5
Pak-Austria Fachhochschule
Institude of Applied sciences And Technology
Add two numbers :

select 2+4;

To show current date and time :

select current_date(),current_time();

Overview :

In this lab, we familiarized ourselves with SQL queries to interact with databases. We learned
howto display the current date, calculate sums of values in columns, and retrieve specific data
from tables based on conditions. These fundamental skills are essential for managing and
querying databases effectively.

You might also like