Changes to database structure

Optimized databse for deduplication of blobs, which should allow for easier introspection