added final database and indexes on formal and theme