Db refactory

Downsize the core SQLiteDB (sqlitecachedb.py).