Do the following exercises:

  1. Implement the following as stand-alone (separate) Java programs and store them in an Intellij IDEA project named Homework13.
    1. LoadDB - Pull data from the OracleXE IMDB Movie, Actor and Role tables and load it into Oracle KVLite using a key-value structure that supports the following queries. Note that you may need create multiple key structures to support the different queries listed below.

      Use JDBC to connect to the IMDB in OracleXE (see code/13postrelational/HelloJDBC.java). You’ll need to run both OracleXE and KVLite for this program to work properly and will need to include the ojdbc library (see the GlassFish lib/ojdbc6.jar). You should only have to run it once before running any (or all) of the query programs specified below on the resulting KVLite key-value database.

    2. GetTableValues - Get the basic field values from the Movie table. The output should look something like this.

      Table: movie
      ID: 92616
      	Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb
      	1964
      	8.7

      This sample prompts for the table name and ID; you may read or hard-code these values. Also, the output ignores SequelId, which is fine for this assignment.

    3. GetMovieActorRoles - Get the roles, if any, for which a given actor is cast in a give movie. Sample execution:

      Movie ID: 92616
      Actor ID: 429719
      	Dr. Strangelove
      	Group Capt. Lionel Mandrake
      	President Merkin Muffley

      This example shows all three roles that Peter Sellers famously played in Dr Strangelove.

    4. GetMovieActors - Get the actors if any, who are cast in a given movie. Sample execution:

      Movie ID: 92616
      	427460	George C. Scott	Gen. 'Buck' Turgidson
      	429719	Peter Sellers	Dr. Strangelove
      	429719	Peter Sellers	Group Capt. Lionel Mandrake
      	429719	Peter Sellers	President Merkin Muffley
    5. GetSortedMovies - List all the movies in order of year. Sample output:

      1960	238071	Ocean's 11
      1964	92616	Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb
      1972	130128	Godfather, The
      1977	313459	Star Wars
      …

    Name the programs as listed above and include comments in LoadDB documenting your key-value structure and how it supports the various queries.

  2. Store answers the following questions in a Homework13/notes.txt file in your solution application.

    1. What type of noSQL database system is Oracle’s NoSQL product, KVLite?
    2. The Internet Movie DataBase (imdb.com) is currently implemented in mySQL. If you were required to port it to a noSQL system, which of the noSQL system types would you suggest? Explain your answer.
    3. Could you (efficiently) reuse the same key-value structure for exercise 13.1.d (above) to retrieve its “opposite”, i.e., get the movies in which a given actor is cast? Why or why not?
    4. NoSQL databases are often referred to as schema-less or schema-free. Explain what this means using examples from your homework solution.

Checking in

We will grade your work according to the following criteria: