CSc 8711. Databases and the Web
Summer 2000, Programming Project 4 (Geography XML Database in Lore)
Due: Thursday, July 20th

The project consists of 3 parts:
  1. The first part requires each of you to collect data on a few states from http://www.kids.infoplease.lycos.com/states.html. The airport city codes are available at http://www.faa.gov/aircodeinfo.htm (Thanks, Mengqui!) The format of the data should be as follows (note: there should be no space after the begin lt symbol in the start tags; I could not get rid of it in the html source!):
        < state id="georgia">
          < scode>GA</scode>
          < sname>Georgia</sname>
          < capital idref="atlanta"/>
          < cities-in idref="atlanta"/>
          < cities-in idref="columbus"/>
          < cities-in idref="savannah"/>
          < cities-in idref="macon"/>
          < nickname>Peach State</nickname>
          < population>6478216</population>
       </state>
    
        < city id="atlanta">
          < ccode>ATL</ccode>
          < cname>Atlanta</cname>
          < state-of idref="georgia"/>
       </city>
        < city id="columbus">
          < ccode>CLB</ccode>
          < cname>Columbus</cname>
          < state-of idref="georgia"/>
       </city>
        < city id="savannah">
          < ccode>SVN</ccode>
          < cname>Savannah</cname>
          < state-of idref="georgia"/>
       </city>
        < city id="macon">
          < ccode>MCN</ccode>
          < cname>Macon</cname>
          < state-of idref="georgia"/>
       </city>
    
    The states are assigned as follows:
    1. Akkaladevi: New York, New Mexico
    2. Bhagavati: North Dakota, North Carolina
    3. Cao: Alabama, Alaska
    4. Fan: Michigan, Illinois
    5. Hermann: Rhode Island, Maryland
    6. Issolah: Connecticut, Montana
    7. Ji: Idaho, Minnesota
    8. Karhade: New Hampshire, New Jersey
    9. Katta: Nevada, Arizona
    10. Liu: Wisconsin, Pennsylvania
    11. Madiraju: California, Delaware
    12. Mashru: Ohio, Oklahoma
    13. Miglani: Kansas, Louisiana
    14. Qin: Nebraska, Indiana
    15. Shi: Mississippi, Massachusetts
    16. Shteynberg: Texas, Tennessee, Utah
    17. Tu: Colorado, Kentucky
    18. Venkataraman: Florida, Hawaii, Iowa
    19. Wang, Jun: Missouri, Maine
    20. Wang, Yanfei: Wyoming, South Dakota, South Carolina
    21. Wu: Vermont, Virginia, West Virginia
    22. Zheng: Arkansas, Washington, Oregon
  2. The second part of the project requires you to write and execute Lorel queries for the following:
    1. Get the name and city code of the capital city of "Georgia".
    2. Get the name and population of the state of city "Miami".
    3. Get the number of "Indiana" cities in the database.
    4. Get the names of states along with their capital city names.
    5. Get the number of states whose names begins with the letter "M".
    Please submit a screen capture.
  3. The third part of the project requires you to write a program in C++ which implements the following menu-based system:
        MAIN MENU
    
      (1) Given the first letter of a state, print all states along
          with their capital city names.
      (2) Print the top 5 populated states in descending order of 
          population.
      (3) Given a state name, list all information about that state,
          inlcuding capital city, population, state nickname, major
          cities, etc. The report should be formatted nicely.
      (4) Print an alphabetical count of number of states for each letter of
          the English alphabet. (Nicely formatted; 4 letter counts to a line).
          The count is the number of states whose names begin with the particular
          letter.
      (5) Quit
    
    The program should use the Lore/C++ API to get the data from the Lore database.