Allow user to manually update the database tables.

    User options from initial prompt are:

      - 'ls' : print database contents
      - 'a' : add an row to a database table
      - 'd' : delete a single table row
      - 'p' : delete an entire table (purge)
      - 'f' : finish updates and continue
      - 'x' : finish updates and exit

    Selecting add, delete or purge will proceed to a further prompt where the
    user can enter exactly what information should be added or deleted.

def ManualUpdateTables(self):
    """
    Allow user to manually update the database tables.

    User options from initial prompt are:

      - 'ls' : print database contents
      - 'a' : add an row to a database table
      - 'd' : delete a single table row
      - 'p' : delete an entire table (purge)
      - 'f' : finish updates and continue
      - 'x' : finish updates and exit

    Selecting add, delete or purge will proceed to a further prompt where the
    user can enter exactly what information should be added or deleted.
    """
    goodlogging.Log.Info("DB", "Starting manual database update:\n")
    updateFinished = False

    # Loop until the user continues program flow or exits
    while not updateFinished:
      prompt = "Enter 'ls' to print the database contents, " \
                     "'a' to add a table entry, " \
                     "'d' to delete a single table row, " \
                     "'p' to select a entire table to purge, " \
                     "'f' to finish or " \
                     "'x' to exit: "
      response = goodlogging.Log.Input("DM", prompt)

      goodlogging.Log.NewLine()
      goodlogging.Log.IncreaseIndent()

      # Exit program
      if response.lower() == 'x':
        goodlogging.Log.Fatal("DB", "Program exited by user response")

      # Finish updating database
      elif response.lower() == 'f':
        updateFinished = True

      # Print database tables
      elif response.lower() == 'ls':
        self.PrintAllTables()

      # Purge a given table
      elif response.lower() == 'p':
        response = goodlogging.Log.Input("DM", "Enter database table to purge or 'c' to cancel: ")

        # Go back to main update selection
        if response.lower() == 'c':
          goodlogging.Log.Info("DB", "Database table purge cancelled")

        # Purge table
        else:
          if response in self._tableDict.keys():
            self._PrintDatabaseTable(response)

            deleteConfirmation = goodlogging.Log.Input("DB", "***WARNING*** DELETE ALL ROWS FROM {0} TABLE? [y/n]: ".format(response))
            deleteConfirmation = util.ValidUserResponse(deleteConfirmation, ('y', 'n'))

            if deleteConfirmation.lower() == 'n':
              goodlogging.Log.Info("DB", "Database table purge cancelled")
            else:
              self._PurgeTable(response)
              goodlogging.Log.Info("DB", "{0} database table purged".format(response))
          else:
            goodlogging.Log.Info("DB", "Unknown table name ({0}) given to purge".format(response))

      # Add new row to table
      elif response.lower() == 'a':
        addFinished = False
        while not addFinished:
          prompt = "Enter new database row (in format TABLE COL1=VAL COL2=VAL etc) " \
                    "or 'c' to cancel: "
          response = goodlogging.Log.Input("DM", prompt)

          # Go back to main update selection
          if response.lower() == 'c':
            goodlogging.Log.Info("DB", "Database table add cancelled")
            addFinished = True

          # Add row to table
          else:
            self._UpdateDatabaseFromResponse(response, 'ADD')

      # Delete row(s) from table
      elif response.lower() == 'd':
        deleteFinished = False
        while not deleteFinished:
          prompt = "Enter database row to delete (in format TABLE COL1=VAL COL2=VAL etc) " \
                    "or 'c' to cancel: "
          response = goodlogging.Log.Input("DM", prompt)

          # Go back to main update selection
          if response.lower() == 'c':
            goodlogging.Log.Info("DB", "Database table row delete cancelled")
            deleteFinished = True

          # Delete row(s) from table
          else:
            self._UpdateDatabaseFromResponse(response, 'DEL')

      # Unknown user input given
      else:
        goodlogging.Log.Info("DB", "Unknown response")

      goodlogging.Log.DecreaseIndent()
      goodlogging.Log.NewLine()

    goodlogging.Log.Info("DB", "Manual database update complete.")
    self.PrintAllTables()