New Database class!
Refactored the relations code