In this recipe we will learn how to use the Core Data Model Editor to build our database schema for our BooksLibrary application.
Following on from our previous recipe, ensure that our BooksLibrary project file is open.
To begin, follow these simple steps as outlined in the following order:
BooksLibrary.xcdatamodel
file from Project Navigator.
Attribute |
Type |
---|---|
|
|
|
|
|
|
|
|
The Core Data database model is stored within BooksLibrary.xcdatamodel
, located within the BooksLibrary
group within the Project Navigator window. In this recipe, we learned how to define the database schema for our SQLite database and create the entities (table) and attributes (fields) that will enable our application to write to these fields within the database, so that it can be queried later.
In our next recipe, we will take a look at how to create the core data model files that will allow us to access the table definitions.