Remove an invalid comment and an unused import.
Use __slots__ in Records.

Not sure if it made the database any faster.
Add database fn-s that close/open/attach/detach threads.
Add visual indications for closed/attached threads.
Return None from *_remove functions.

Transporting cache may be costly.