refactoring database_class to handle relations without sequences
implemented simple generalized aggregation selector
modified classes to adhere to new standards