analysis over the database