Stores metadata in the database