Renaming query lib to db