Saving and listing keys to/from database