Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

EXERCISES

1. Consider the following relational database that Best Airlines uses to keep track of its mechanics, their skills, and their airport locations. Mechanic number (MECHNUM), airport name (AIRNAME), and skill number are all unique fields SIZE is an airport's size in acres. SKILLCAT is a skill category, such as an engine skill, wing skill, tire skill, etc. YEARQUAL is the year that a mechanic first qualified in a particular skill; PROFRATE is the mechanic's proficiency rating in a particular skill.

MEXHANIC Table

MECHNUM

MECHNAME

AGE

SALLARY

AIRNAME

AIRPORT Table

AIRNAME

CITY

STATE

SIZE

YEAROPENED

SKILL Table

SKILLNUM

SKILLNAME

SKILLCAT

QUALIFICATION Table

MEXHNUM

SKILLNUM

YEARQUAL

PROFRATE

Write SQL SELECT commands to answer the following queries.

a. List the names and ages of all the mechanics.

b. List the airports in California that are at least 20 acres in size and have been open since 1935. Order the results from smallest to largest airport.

c. List the airports in California that are at least 20 acres in size or have been open since 1935.

d. Find the average size of the airports in California that have been open since 1935.

MINICASES

1. Consider the following relational database for Happy Cruise Lines. It keeps track of ships, cruises, ports, and passengers. A "cruise" is a particular sailing of a ship on a particular date. For example, the seven-day journey of the ship Pride of Tampa that leaves on June 13, 2011, is a cruise. Note the following facts about this environment.

• Both ship number and ship name are unique in the SHIP Table.

• A ship goes on many cruises over time. A cruise is associated with a single ship.

• A port is identified by the combination of port name and country.

• As indicated by the VISIT Table, a cruise includes visits to several ports and a port is typically included in several cruises.

• Both Passenger Number and Social Security Number are unique in the PASSENGER Table. A particular person has a single Passenger Number that is used for all the cruises she takes.

• The VOYAGE Table indicates that a person can take many cruises and a cruise, of course, has many passengers.

SHIP Table

SHIPNUM

SHIPNAME

BUILDER

IAUNCHDAIE

WEIGHT

CRUISE Table

CRUISENUM

STARTDATE

ENODATE

DIRECTOR

SHIPNUM

PORT Table

PORTNAME

COUNTRY

NUMDOCKS

MANAGER

VISIT Table

CRUISENUM

PORTNAME

COUNTRY

ARRDATE

DEPDATE

PASSENGER Table

PASSENGERNUM

PASSENGERNAME

SOCSECNUM

STATE

COUNTRY

VOYAGE Table

PASSENGERNUM

CRUISENUM

ROOMNUM

FARE

Write SQL SELECT commands to answer the following queries.

a. Find the start and end dates of cruise number 35218.

b. List the names and ship numbers of the ships built by the Ace Shipbuilding Corp. that weigh more than 60,000 tons.

c. List the companies that have built ships for Happy Cruise Lines.

d. Find the total number of docks in all the ports in Canada.

e. Find the average weight of the ships built by the Ace Shipbuilding Corp. that have been launched since 2000.

f. How many ports in Venezuela have at least three docks?

g. Find the total number of docks in each country. List the results in order from most to least. It Find the total number of ports in each country.

i. Find the total number of docks in each country but include only those countries that have at least twelve docks in your answer.

j. Find the name of the ship that operated on (was used on) cruise number 35218.

k. List the names, states and countries of the passengers who sailed on The Spirit of Nashville on cruises that began during July, 2011.

l. Find the names of the company's heaviest ships.

m. Find the names of the company's heaviest ships that began a cruise between July 15, 2011 and July 31, 2011.

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M92183798
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in DBMS

Quesiton 1 what is data-manipulation language dml there are

Quesiton: 1. What is Data-Manipulation Language (DML)? There are four types of access in DML, explain each one. 2. Assume we have a Library Database consists of the following relations: author(author_id, first_name, last ...

Questionsuppose a prolog database exists that gives

Question: Suppose a Prolog database exists that gives information about states and capital cities. Some cities are big, others small. Some states are eastern, others are western. a. Write a query to find all the small ca ...

Question lab 1 creating a database designthis assignment

Question: Lab 1: Creating a Database Design This assignment contains two (2) Sections: Database Design Diagram and Design Summary. You must submit both sections as separate files in order to complete this assignment. Not ...

In sql developercreate a table userpermissions provide

IN SQL DEVELOPER Create a table UserPermissions (provide create and insert statements code) Document UserName Policy SYSTEM Menu JDOW W2 USAM Permissions SYSTEM W2 JDOW Form 1040 USAM Policy JDOW W2 SYSTEM Write a PL/SQL ...

A schools office of the registrar maintains data about the

A School's office of the registrar maintains data about the following entities: a) courses (including course number, title, credits, syllabus and prerequisites), b) course offerings (including course number, year, semest ...

Instructionsfor decades relational databases remained

Instructions For decades, relational databases remained essentially unchanged; data was segmented into specific chunks for columns, slots, and repositories, also called structured data. However, in this Internet of Thing ...

The groceries datasetimagine 10000 receipts sitting on your

The groceries Dataset Imagine 10000 receipts sitting on your table. Each receipt represents a transaction with items that were purchased. The receipt is a representation of stuff that went into a customer's basket. That ...

This is a starting out with visual basic programming

This is a starting out with visual basic programming problem, meaning its a basic programming nothing advanced. Question: Add a linq statement to the combo box text-changed event to dispaly the city field of the selected ...

Suppose that we have a table of house prices and a table of

Suppose that we have a table of house prices and a table of zip codes: • hprices(hid (PK),address,bedrooms,price,zipcode) • zipcodes(zipcode (PK),state) Write a SQL query that finds the average, maximum, and minimum pric ...

Question create an erd for the following scenario once you

Question: Create an ERD for the following scenario. Once you submit you will get access to the correct way to create the ERD. Please watch the video and correct any errors in your submission and resubmit. A small company ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As