You are on page 1of 11

BS (Information Technology) Semester 4th (Evening)

Topic:

Relational Algebra & SQL

Submitted By:

Asma Komal 3006

Submitted To:

Sir Khursheed Asghar

Dept. of Computer Science

University of Education Lahore (Okara Campus)


DESCRIPTION
The database maintained by the SPCC has four tables:
1. PEAk (Name, Elevation, Different, Map, Region)
2. Climber (Name, Gender)
3. Participated (trip_id, Name)
4. Climbed (trip_id, peak, date)
Given below the create table query in which show all columns and data
types.

PEAk (NAME, ELEVATION, DIFFERENT, MAP, REGION)


Insert Values in Peak Table

Select Table Peak


Climber (Name, Gender)

Insert Values in Climber Table

Select Table Climber


Participated (trip_id, Name)

Table Participated 1

Table Participated 2

Who has gone on a climb with Mark?


Insert Values in Participated Table

Select Table Participated

Climbed (trip_id, peak, date)


Insert Values in Climbed Table

Select Table Participated

1.Which peaks are difficulty level 5?


2.Which females have climbed a 14,000 peak?

3.Who has gone on a climb with Mark?

5.Which maps have a maximum peak height of less


than 10,000 feet?

6.Find any maps that have peaks from more than one
region on them.
7.Which peaks are on a map with a peak that is at
least 14,000 feet in height?

8.Which peaks of difficulty level 5 (if any) remain


unclimbed?

9.Which maps have at least a 2,000 foot difference


between the shortest and tallest peak on the map?
10.In which query they are the participated who
climbed the peaks and they are five participators who
climbed it.
14. Who has climbed every single peak that Barbara
has climbed?

You might also like