Open a descriptor on an NDBM database. The first argument is
the name of the database (without the .dir and .pag suffixes).
The second argument is a list of flags: Dbm_rdonly opens
the database for reading only, Dbm_wronly for writing only,
Dbm_rdwr for reading and writing; Dbm_create causes the
database to be created if it does not already exist.
The third argument is the permissions to give to the database
files, if the database is created.
Enumerate all keys in the given database, in an unspecified order.
firstkey db returns the first key, and repeated calls
to nextkey db return the remaining keys. Not_found is raised
when all keys have been enumerated.