English 中文(简体)
中间储存的核心数据
原标题:Core Data with in-memory store

I want to use Core Data as a cache for a larger dataset on a database server. Not all data will be in memory.

在考虑这另外两个问题时:

  1. 是否可将过失(例如1-n关系)用于中层持久性储存,如果是的话,你如何追捕过错的射击?

  2. A. 导 言 核心数据所管理的目标环境具有分流。 这是否也适用于室内储存?

或者,我是否应该为此目的使用一个NSAtomicS仓库?

最佳回答

您的第一个问题表明,你错误地解释了NSInMemoryStore型持久性储存的意图。 它们是核心数据组的一部分。 在你将事件带入管理物体的情况下,发生违约事件;造成过失,火灾和人口自<代码>起。 NSPersistentStore Co Coordinator sache or the underlying persistent Store when fire. 中间店不会改变疏漏关系。 显然,它确实帮助了你的问题,但是,由于你必须用persist所有数据来保存。 网上储存确实适合 (1) 测试(快速重压)和(2) 预支核心数据库,在其中,你想要使用核心数据标书管理,而不必坚持任何磁盘。

回答你的第二个问题,答案是YES。 间隔期适用于情况,而不是持久性储存。

因此,核心数据是否适合从遥远的数据库服务器收集数据? 实际情况并非如此。 尽管比尔·布姆加纳(一家 Apple木工程师)暗示这是可能的,但我发现,在我自己的法典中,将沥滤与核心数据标的图表管理分开比较容易。 利用核心数据管理物体图和方便对主计长/审计师一级具有约束力,这仍然很 n。 因此,我的战略是从数据库服务器中提取数据,并在我自己的数据结构中收集数据(SOS 10.6中的校准和NSCache可能是一个非常好的起点)。 然后,决定你在标本中想要的东西,并将之移至核心数据组(由一流的固定储存所支撑)。 你必须处理从数据库服务器机车发出的变更通知或投票。 当数据库数据发生变化(或用户查询变化等)时,我只告诉所有编辑完成编辑工作,然后从(可能)更新的海滩上抹去背景和重建。

问题回答

暂无回答




相关问题
Asynchronous request to the server from background thread

I ve got the problem when I tried to do asynchronous requests to server from background thread. I ve never got results of those requests. Simple example which shows the problem: @protocol ...

objective-c: Calling a void function from another controller

i have a void, like -(void) doSomething in a specific controller. i can call it in this controller via [self doSomething], but i don t know how to call this void from another .m file. I want to call ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

NSUndoManager and runModalForWindow:

I have a simple Core Data app which displays a list of entities in the main window. To create or add new entities, I use a second modal window with a separate managed object context so changes can be ...

NSMutableArray values becoming "invalid"

I m trying to show a database information in a tableview and then the detailed information in a view my problem is as follow: I created a NSMutableArray: NSMutableArray *myArray = [[NSMutableArray ...

iPhone numberpad with decimal point

I am writing an iPhone application which requires the user to enter several values that may contain a decimal point (currency values, percentages etc.). The number of decimal places in the values ...

热门标签