Hi, I have used CoreData a couple of times but data modeling was very simple. This time I am supposed to implement the following:
- User can create documents and folders (they don't have to be real folders/directories).
- Folders can contain documents or other folders
- Documents have:
- 1 Title,
- 1 Description and
- 8 children
- Each child also has a Title and a Description and could have 8 children (optionally)
- This could be as many levels (recursive) as the user desires.
I am not sure how to express this in CoreData. Could someone give a hand here? Right now I think of:
"Child" entity with "Title" "Description" as attributes and "Children" as a relationship (one to many). "File" entity with "IsFolder" as a boolean attribute and "Documents" as a relationship (one to many, pointing to "Child")
I am not sure if this well implements above structure in CoreData. I am in the right path? Re-modeling data structure in CoreData could be painful (I've heard) so i would like to have a good structure from the beginning. I hope I can get some advice from you;)
Thanks in advance.