solving problem of database