Separating the database function in separate library, so we can use it in animal class aswell