moved query to DatabaseAccess
implemented table view, no selection or update yet