Database: Add real functionality (WIP)