review the code of database