存储大量数据的最佳方式
我正在开发一个应用程序,需要根据用户在美国的位置从数据列表中提取数据。从某种意义上说,我将拥有一个充满基于其位置的信息的数据库,并且条件语句将确定要使用的列表中的 while 值。
数据示例:
田纳西州:
Data2 = 25;
Data3 = 58;
...
德克萨斯州:
Data2 = 849;
Data3 = 9292;
...
等等...
我的问题是,在开发 iOS 应用程序并且您拥有大量数据时,使用的最佳实践是什么?您是否应该将所有相关数据放入一个文件中,并在需要时导入该文件,或者是否应该使用其他方法?我知道他们说你应该遵循 MVC 实践,我认为在这种情况下我的数据将被视为模型,但只是想仔细检查这是否适用于此。
I'm working on an application that will need to pull from a list of data depending on where the user is located in the US. In a sense, I will have a database full of information based on their location, and a condition statement will determine while value from the list to use.
Example of data:
Tennessee:
Data2 = 25;
Data3 = 58;
...
Texas:
Data2 = 849;
Data3 = 9292;
...
So on...
My question is, what is the best practice to use when developing iOS apps and you have a lot of data? Should you just put all the related data in a file, and import that file when you need to like normal, or is there another method you should use? I know they state you should follow the MVC practice, and I think in this case my data would be considered the Model, but just want to double check if that applies here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您在这里有一些选择:
如果您想经常将数据追加到单个文件中,我建议使用快速且健壮的 sqlite。
You have some options here:
If you want to frequently keep appending data to a single file, I would recommend using sqlite fast and robust.