CS 495 -- Database of Battle

 
What
General Weapon
Lee Rifle
Attila Spear
Julius Ceaser Spear
Rommel Tank
Grant Rifle
McCarther Perl HandledPistol
Cornel Potter Sarcastic Wit
Cornel Sanders Chicken
 
Where
General Where
Lee America
Attila Europe
Julius Ceaser Mediterranian
Rommel Africa
Grant America
McCarther Africa
Cornel Potter Korea
Yamato Pacific
 
Who
General Opponent
Lee Grant
Attila Charlemange
Julius Ceaser Verguixes
Rommel McCarther
Grant Lee
 
 
  1. Suppose I do a simple join of all three tables, to compute the cartesian product of the tables.  How many rows will I get? _____________
  2. (True/False) A single table can contain both fields of type test and of type integer.
  3. Why do we want these ACID proporties?
    A ______________________________________________________________________________
    C ______________________________________________________________________________
    I _______________________________________________________________________________
    D _______________________________________________________________________________
  4. Write me an SQL query that tells me who fought in Africa.






  5. Write me an SQL query that shows the people who fought and the weapons that have been used in Africa.  There is an index on What.General names 'wg'.  Use it if you can.







  6. Write me an SQL query that tells me where rifles haved been used.






  7. Write me a LITE loop that prints the sum of the integer array 'fred'.







  8. Give an example from above of a relation: __________________________________________________
  9. Give an example from above of a tuple: ____________________________________________________
  10. Which of these operations would be speeded up by an index on Who.General
  11. Who burned Atlanta? ____________________________________________
  12. (3 points) Write me an HTML page that include a LITE program that prints the Where table.