Modify database handling