What is database seeding in the context of Core Data?
In the context of core data seeding just means shipping your app with a persistent store pre-populated with default data. In the recipes example Apple has, the seeded data is the recipe data that they have in the sqlite database that's a part of the project.
http://en.wikipedia.org/wiki/Database_seeding
Database seeding is the initial seeding of a database with data.
This is often an automated process that is executed upon the initial setup of an application.
The data can be dummy data or necessary data such as an initial administrator account.
In my opinion, Database seeding should only be used for development purposes like:
- loading the development environment with some "pseudo" real-world data in order to make the application use cases usable;
- carry out performance testing (i.e. see how the application performs with real-world data volume, instead of just having some manually entered data).
If the application needs some pre-bundled/necessary data, then a database migration is the way to go (please note that the page linked only mentions schema migrations, or DDL queries, but migrations can be used to perform arbitrary queries to the DBMS, including DML queries).
© 2022 - 2024 — McMap. All rights reserved.