Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9201947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:08:26+00:00 2026-06-17T23:08:26+00:00

I read some articles and info in developer.apple.com about Core Data. Now I want

  • 0

I read some articles and info in developer.apple.com about Core Data. Now I want to create ManagedObjectModel for my app. So I need to help – because it’s first my planning about database. So my app will have next options

  1. User must login with his Login and Password. So if he forget password, there is chance to create new pass by entering correct answer on secret question.
  2. App will store contacts. Every contact have name, surname, photo, phones, and coollection of map annotations.
  3. User can create some groups (like Family, Friends…)

So this app I create for understanding basics of objective-c and maybe there are no logic in my app.
Please check my entities, maybe I allowed blunder.

First entity Contact

enter image description here

  • id – number of contact.
  • image – I will store array there. So if image <200 Kb I insert it in database, if more I will save the path to this image
  • map – the dictionary of map annotations
  • name
  • phones – array of phone numbers
  • surname

Second entity Group

enter image description here

  • contacts – array that contain id of contacts, that belong to this group
  • id – number of group
  • title – it is the name of group (like Family, Friends…)

Third entity Login

enter image description here

  • groups – array that contain id of groups, that belong to this group
  • login
  • password
  • secret answer – answer to the secret question
  • secret question

Relationships

enter image description here

So each Login can have some groups, but each group will belong only to one Login. So I create “to-many relationship” for group relationship. So each group contain some contacts and contacts can be in some different gruops – I create many-to-many relationship.

About property “optional”. I understand that if it’s not check – this attribute or relationship have to be. So I remove this property for

  • “id” in Contact
  • “id” in Group
  • “login”, “password” in Login
  • in relationship “toGroups” in Contact
  • in relationship “toLogin” in Group

About “Delete Rule”. I want if I delete some Login all groups and contacts belong to this login must be delete. I can choose “Cascade” for relationship “group” in Login but it will delete only groups but not contacts. I cann’t do such for relationship “toContact” because if I delete some Group it will delete contacts, but other Groups still can have this contacts. So maybe I must create attribute “contact” in Login that will be array of contacts, and create relationship to Contacts and if I delete Login all groups and contacts that belong to it, will be delete.

PS Sorry I am stil newbie and my question maybe funny for you, but I need help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:08:28+00:00Added an answer on June 17, 2026 at 11:08 pm

    A few things I noticed –

    1. You have no need to use ‘id’ properties. Most databases plan on these for primary/foreign key management, but core data will manage this all for you provided you have the relationships set up. Also by this logic, you don’t need properties to manually create that relationship (i.e. ‘Contacts’ in group and ‘groups’ in login
    2. Are you sure you wants to be storing dictionaries and/or arrays in an entity? These sound like another standalone entity such as one for map annotations. Then you would build a one-to-many relationship from the original object to the new one.
    3. Images stored as binary data are not the most efficient way to go about this. Its better to use the filesystem the app sandbox provides. Just saw a similar question the other day Storing images locally on an iOS device
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I've read some articles about scaling Socket.IO. For various reasons I don't want
http://mysite.com/songs/company-name/song-name i want to redirect it to http://mysite.com/songs/index.php?name=company-name&song=song-name i read some articles about that
I read some articles about how to set up eclipse and maven to create
I read some articles about Comet tech. All of them mentioned that the long-life
I've read some articles about Android NDK. Most of them claim Native C is
I have read various articles about passing variables around using RMI. Some of them
I read some articles about the volatile keyword but I could not figure out
Recently I read some articles about some doubts about benefits of acceptance testing, because
I read some articles about SqlCacheDependency. I think it is a really cool way
I've read some articles about writing composite components in JSF 2 and even about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.