Implemented the Database access. Not yet used by the gui.
Implemented Test cases to test the database.
Inserting of portals and changing of key count works.