require 'bdb' db = BDB::Btree.create('e.db', nil, BDB::CREATE) db['earth'] = 'M' db['water'] = 'A' db['air'] = 's' db['fire'] = 'P' db.each { |k,v| puts k } puts db['water'] db.close