سؤال

I am just wondering if there are any advantages and disadvantages such as performance when choosing between NSXMLStoreType and NSSqliteStoreType for Core Data persistent type?

I searched around, and only found NSXMLStoreType is not supported in iOS.

هل كانت مفيدة؟

المحلول

Not supported in OS X? That's news to me (and to the apps in which I used the type for development).

NSXMLStoreType is GREAT for development purposes because you can actually look into the persistent store with a text editor (XML == human-readable) while SQLite or Binary store types are not. SQLite, however, is fastest because it supports atomic updates (update individual records without writing the entire store back out for one little change). XMLStoreType, by contrast trades this speed for readability.

I use XML type for debugging but SQLite in deployed apps. Well, those in which I still use Core Data, that is. CD isn't a good fit for everything. In fact, it's a so-so or poor fit for many when a custom-designed system works just fine (especially where filtering or property setting speed is important).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top