No, you should not make two entity types Just because you have a relationship between two kinds of entities doesn't mean you can't create an object where that relationship is nil So, assuming you have a many-to-many relationship between Student and Exam you might create a new exam by doing something like: Exam *newExam = NSEntityDescription insertNewObjectForEntityForName:@"Exam" inManagedObjectContext:context; newExam. Course = @"CS 101"; newExam. Description = @"Midterm You might then later establish a relationship between a student and that exam like: newExam.
Students addObject:aStudent (where students is the name of the relationship between Exam and Student.
No, you should not make two entity types. Just because you have a relationship between two kinds of entities doesn't mean you can't create an object where that relationship is nil. So, assuming you have a many-to-many relationship between Student and Exam, you might create a new exam by doing something like: Exam *newExam = NSEntityDescription insertNewObjectForEntityForName:@"Exam" inManagedObjectContext:context; newExam.
Course = @"CS 101"; newExam. Description = @"Midterm"; You might then later establish a relationship between a student and that exam like: newExam. Students addObject:aStudent; (where students is the name of the relationship between Exam and Student.
The trick is to make the relationship optional. That way a Student object can have an Exam relationship if it needs one but there is not problem if it doesn't have one. – TechZen Nov 29 '10 at 14:23.
I think you should have a relationship between the two entities (exam and student) but mark it as optional.
Say you have a couple of Core Data entities .. Student and Exam. These two are initially filled with data from two xml files downloaded from the web. Now, Students and Exams are separate things... initially there are no connections between them.
But after filling out these two entities, I might want to connect certain students to certain exams. Or I might want make all students take a particular exam. But I still want to be able to treat Exams as independent things, which might have no students connected.
I'm unsure how to do this with Core Data. In the data model, you either have a relationship or yo don't. Should I have two different entities for Exam... one for independent exams, and one connected to the student which can be built up from the other Exam enitity?
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.