database design refactored