Start of db getters and setters
Split up the db logic