restructuration de database.py