Revert "Revert "Add adpub and file DB""

This reverts commit 3031ba4e96c4e56ae525aea6c05f168a1a899435.