• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Questions about Core Data and SQLite
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions about Core Data and SQLite


  • Subject: Re: Questions about Core Data and SQLite
  • From: Chris Hanson <email@hidden>
  • Date: Mon, 14 Jul 2008 10:44:55 -0700

On Jul 14, 2008, at 8:12 AM, Jens Alfke wrote:

Second, CoreData really isn't meant for having two clients (whether users or processes) accessing the database at once. I think it's possible to do this, but it requires extra work to get each client to detect when the other has changed the db, and invalidate its caches.

Core Data does support multiple simultaneous access to a SQLite persistent store. That's why each NSManagedObjectContext has a staleness interval and a merge policy associated with it, and also why it supports refreshing in-memory objects with the option to merge changes into the refreshed objects.


However, managing simultaneous access by *different users* to a SQLite persistent store is slightly trickier -- they must all access the persistent store in ways that have compatible file locking. This is necessary to maintain database integrity. However, if all you have are a couple of users on a LAN working with a database stored on a shared AFP (AppleShare, Personal File Sharing) volume, that should be fine.

The real difficulty is scaling. Any database that works via a shared filesystem will have significant limits to its scalability. You won't want to have more than a few users sharing the same file.

  -- Chris

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Questions about Core Data and SQLite (From: Jeff Brown <email@hidden>)
 >Re: Questions about Core Data and SQLite (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: KVV and the missing Discard Changes button
  • Next by Date: Re: Creating the app menu from scratch
  • Previous by thread: Re: Questions about Core Data and SQLite
  • Next by thread: Re: Questions about Core Data and SQLite
  • Index(es):
    • Date
    • Thread