change database model

Changing database model for new memex-viewer general application scope