added fmdb, date category, replaced archiving with database