refactor in enterprise/database.py to make some parts of the class more pythonic
more refactors to addapt code to the new PEP 443