Added method with pointer of fonction to manage database and correct database management