You are on page 1of 21

LAB MANUAL

Roll No.: (19-104), (19-112)


Registration No.: 2019-GCWUF-1895, 2019-GCWUF-1900

Student Name: Arooj Amina, Areeza Batool


Submitted to: Mam Faryal
Course Title: Data warehouse
Course Code: ICT-664
Credit Hours: 3(2-0)

Department of Information Technology


GC WOMEN UNIVERSITY FAISALABAD
LAB#1
Installation of Microsoft SQL server:

How to install SQL server 2019 & SSMS


First, go to your google search bar.

2. Type search bar SQL server 2019. And then click enter.

3. Click on the first link that shows first on your screen.

4. After this step go to your next page shows two download express and developer.

5. Click on express and download.

6. After download completion. Go in your computer and double click on SQL. After this
authentication shows a dialog and chose basic.
7. Accept the license.

8. Click to install button.


9. Downloading start.

10. Installation starts.


11. Click on SSMS BUTTON SSMS installation.

12. Copy the link from instance name to "local to feger and copy.
Save on your note pad. For receive when u need it.

13. Scroll down and click on download SSMS. PRESS SAVE BUTTON.

14. When SSMS download on your computer. Double click on it.

And click to install.


15. Installation start.

16. Installation completed.


RESTART YOUR COMPUTER.

LAB#2

How to create Database in SQL server:

Go to your search bar and type the Sql server. Click to open it. A dialog box appeared.
Paste the server name u have already copied. Then click to connect.
Right click on database button and click on new database. A dialog box appeared. Right
the name of database is you like. And then click to ok.

Lab#3
How to create Table and set primary key.

Expand the database to click on + sign. And right click on table then to click new table.
Add the column name and type. Enter the control +S button to save it.
Set primary key:

Right click on column you select for primary key. Click the primary key button to set it.

Lab # 4

Identify specification:

STEP #1:

Select the database now right click on Table and click New Table.
STEP #2:

Now create table.

STEP #3:

Now click on save button and Add table name “Employee”.

 The table with column will show

STEP #4:
Add data into the columns and id will be incremented automatically by 1 and then enter data in
the table.

Lab # 5

North wind and Pubs database installation:

First we go to google search and type to search north wind pubs database.

And click the second option that’s show on google search top.

Click on this link show a file to open it.

Copy this file and paste on Sql server.


Execution of north wind on SQL:

Pubs database file copy from google and paste on Sql.


Execution of pubs on SQL server:

Lab # 6

Selection queries in SQL SERVER:

SELECTION for whole data/table:

SELECTION for specific data:


SELECTION of quires data for specific Format:

SELECTION quarry for Merge / Concatenation:

SELECTION quarry for Merge / Concatenation and space between data:


SELECTION quarry for changing the table name:

Lab # 7

WILDCARD and LIKE operator in SQL SERVER:


Lab # 8

ROLLUP, GROUP BY, AND CUBE operations (ROLAP)

GROUP BY:

GROUP BY CUBE:

ROLLUP:
Lab # 9

BETWEEN Operator in SQL SERVER:

Use to select value between specific ranges.

Extract data where EMP ID between 6 and 8.

Example 2:
Example 3:

Example 4:

Product table where UNITSSTOCK between 0 to 5.


Lab # 10

Select from product table:

Select SUM (unit price) from product table:


Select avg (unit price) from product table:

Select min (unit price) from product table:

You might also like