Use db_begin/commit_transaction() when scan library.