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

Solutions Manual Fundamentals

disadvantage: inefficient for views defined via complex queries (especially if additional queries are to be applied to the view within a short time period)

Uploaded by

Muhammad Ismaeel
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)
109 views

Solutions Manual Fundamentals

disadvantage: inefficient for views defined via complex queries (especially if additional queries are to be applied to the view within a short time period)

Uploaded by

Muhammad Ismaeel
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

Lab Manual

EE436L: Database

6 Engineering
Department of Electrical Engineering
University of Engineering and Technology Lahore 2019
Instructor: Mr. Umer Shahid

Name
Registration Number _

Lab Title: WRITING SQL QUERIES

Consider the following database schema for this lab:


Sailor (sid, sname, rating, age)
Boat (bid, bname, color)
Reserve (sid, bid, day)

Example instances of sailor, reserve, and boat are given on next page. Please remember that
your queries should work in general for all valid instances.

1. Find the names and ages of all sailors.


2. Find all sailors with a rating above 7.
3. Find the names of sailors who have reserved boat number 103.
4. Find the sids of sailors who have reserved a red boat.
5. Find the names of sailors who have reserved a red boat.
6. Find the colors of boats reserved by Lubber.
7. Find the names of sailors who have reserved at least one boat.
8. Compute increments for the ratings of persons who have sailed two different boats on the
same day.
9. Find the ages of sailors whose name begins and ends with B and has at least three
characters.
10. Find the names of sailors who have reserved a red or a green boat.
1 EE-Semester 8 (Spring 2019)
Department of Electrical Engineering
University Of Engineering and Technology Lahore
11. Find the names of sailors who have reserved both a red and a green boat.
12. Find the sids of all sailors who have reserved red boats but not green boats.
13. Find all sids of sailors who have a rating of 10 or reserved boat 104.

For better understanding, instead of executing all queries on the workbench, try writing them on
a piece of paper first.

2 EE-Semester 8 (Spring 2019)


Department of Electrical Engineering
University Of Engineering and Technology Lahore

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy