fix slicing of Database objects
do not rely on the ID. Rather, database[0] always returns the oldest entry
in the database, regardless of the ID (which may disappear because an entryhas
been removed).