All are based on the following airline database schema Fligh

All are based on the following airline database schema:

Flights(flno, from, to, distance, departs)

Aircraft(aid, aname, range)

Certified(eid, aid)

Employees(eid, ename, salary)

By definition, pilots are those employees who are certified on at least one aircraft. An aircraft can be used for any flight provided it has sufficient range. Pilots can pilot any flight provided they are certified on an aircraft with sufficient range.

PROBLEMS:

1. Find flno of flights that can be piloted by every pilot whose salary is over $100,000.

2. Solve problem 4 without using the division operator.

3. Find names of pilots who can operate planes with a range greater than 3,000 miles, but are not certified on any Boeing.

4. Find eid of employee(s) with the highest salary.

5. Find eid of employee(s) with the second highest salary.

Consider the following conditions in your instantiation:

A. Design a table with 10 tuples (rows) For each of four tables provided in airline data base schema.

B. Fill in tables with random values. (Values should be meaningful)

C. Tables that have common columns (e.g. ‘aid’), should have at least 4 common values for that column.

D. Based on your original tables, create result table for each operation.

THANK YOU

Solution

import java.util.*;

public category ArrayListExample i am attending to add String
*elements therefore I created it of string kind */
   ArrayList<String> obj = new ArrayList<String>();

   /*This is however components ought to be value-added to the array list*/
   obj.add(\"Ajeet\");
   obj.add(\"Harry\");
   obj.add(\"Chaitanya\");
   obj.add(\"Steve\");
   obj.add(\"Anuj\");

   /* Displaying array list components */
   System.out.println(\"Currently the array list has following elements:\"+obj);

   /*Add part at the given index*/
   obj.add(0, \"Rahul\");
   obj.add(1, \"Justin\");

   /*Remove components from array list like this*/
   obj.remove(\"Chaitanya\");
   obj.remove(\"Harry\");

   System.out.println(\"Current array list is:\"+obj);

   /*Remove part from the given index*/
   obj.remove(1);

   System.out.println(\"Current array list is:\"+obj);
}
}
Output:

Currently the array list has following elements:[Ajeet, Harry, Chaitanya, Steve, Anuj]
Current array list is:[Rahul, Justin, Ajeet, Steve, Anuj]
Current array list is:[Rahul, Ajeet, Steve, Anuj]
Methods of ArrayList category

In the on top of example we\'ve got used ways like add and take away. but there square measure range of ways accessible which may be used directly exploitation object of ArrayList category. Let’s discuss few of the necessary ways.

1) add( Object o): This methodology adds Associate in Nursing object o to the arraylist.

obj.add(\"hello\");
This statement would add a string how-do-you-do within the arraylist ultimately position.

2) add(int index, Object o): It adds the item o to the array list at the given index.

obj.add(2, \"bye\");
It will add the string bye to the 2d index (3rd position because the array list starts with index 0) of array list.

3) remove(Object o): Removes the item o from the ArrayList.

All are based on the following airline database schema: Flights(flno, from, to, distance, departs) Aircraft(aid, aname, range) Certified(eid, aid) Employees(eid
All are based on the following airline database schema: Flights(flno, from, to, distance, departs) Aircraft(aid, aname, range) Certified(eid, aid) Employees(eid

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site