Some working database and document code
Add tag support for sqlite