database restructured