added class DbOpenHelper, refactored sql code, tested