moved database interaction files into the db subdirectory