Fixed database queries due to changed id columns in swing application.