partial abstraction to db.py
refactored search book functionality. used abstraction to db.py
refactored db.py. completed abstraction to querries