I’m developing a personal finance app using Core Data, but because I’m used to work in DBMS environment, I’m kind of confused here.
The problem is, in the Data Model, I’ve decided to use four entities; Expense, Income, Goal and Recurring. But it seems that those entities don’t have the relationship between one another.
I’ve tried to add one more entity called Balance to connect Income and Goal, but apparently it still doesn’t make sense because that entity will not be used.
So is there any way for me to connect those four entities? Is it possible to create the entities in the same Data Model but there are no relationships between them? Or should I create a separate Data Model for each of the entities?
Thanks in advance.
Seems like you could go one of two routes. You could either create a 5th entity like a User or Person entity that has relationships to each of the other entities as they would have expenses, incomes, goals and recurrences and use that as a way to get to them or you could leave them all separate and access them that way. It’s really about the same either way. Although if you think you might support multiple accounts for some reason it might make sense to have that 5th entity to tie them together almost like a Document type.
But the short answer is you wouldn’t connect the entities to each other artificially unless there was a real reason to do so. If you were going to have an entity for something like an annual plan that would reasonably have relationships to these other entity types.