refactoring goals in databases
merged last changes and finished implementing new schea for db