All quizzes
Free quiz · 20 questions in the bank

Core Data quiz

Test your Core Data knowledge with a free interactive quiz — 20 questions with answers and explanations. No signup needed to play.

Question 1/12Score 0

What is the role of `NSPersistentContainer`?

In this round
  1. What is the role of `NSPersistentContainer`?
  2. Why does Core Data avoid loading an entire large dataset into memory when displaying, say, thousands of records?
  3. What is `@FetchRequest` in SwiftUI, and how does it relate to Core Data?
  4. What is a `NSFetchedResultsController` used for?
  5. What does `viewContext` refer to on an `NSPersistentContainer`?
  6. What does `NSBatchDeleteRequest` provide that a normal fetch-then-delete loop doesn't?
  7. Why is it generally unsafe to pass an `NSManagedObject` fetched on one context/thread directly into another thread's work?
  8. What happens if you call `context.save()` and it throws an error — what is a common cause?
  9. What is the difference between a Core Data "attribute" and a "relationship" on an entity?
  10. What is an `NSManagedObjectContext`?
  11. What does `NSManagedObjectContext.mergePolicy` control?
  12. What is a lightweight migration in Core Data?
Gaps to close?
Read the curated Core Data notes — core concepts, patterns, interview prep.
Core Data notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web