<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clear_db():
 """Clear the entire db."""

    cursor = '0'
    while cursor != 0:
        cursor, keys = DB.scan(cursor, match='*', count=5000)
        if keys:
            DB.delete(*keys)