restruct DB