使用内置本地数据库或独立存储 [英] Use built-in local database or Isolated storage

查看:44
本文介绍了使用内置本地数据库或独立存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

本地数据库现已内置到 Windows Phone 7.5 Mango 中.我正在考虑使用数据存储一些不相关的集合的场景.使用本地数据库非常简单,而使用独立存储需要更多的自定义开发.还有一些替代解决方案,如 FileDb,在此处的芒果前讨论中提到 https://stackoverflow.com/a/6954250/346995

Local database is now built into Windows Phone 7.5 Mango. I'm considering a scenario of storing a few unrelated collections with data. Using the local database is pretty straightforward, while using Isolated storage requires a bit more custom development. There are also some alternative solutions like FileDb, mentioned in a pre-mango discussion here https://stackoverflow.com/a/6954250/346995

就简单性和性能而言,本地数据库/隔离存储的最佳解决方案是什么?本地数据库是否适合大多数场景?

What would be the best solution of local database/Isolated storage with regards to simplicity and performance? Would local database fit most scenarios?

推荐答案

除非您要存储关系数据(听起来您不是),否则我建议使用 IsoStore.使用起来其实并没有那么难.

Unless you are going to be storing relational data (and it sounds like you aren't) I would suggest using the IsoStore. It isn't really that difficult to use.

现在,就性能而言.在手机上读取磁盘不会很快.话虽如此,您使用的任何解决方案最终都将保存到磁盘;所以我认为如果你使用 DB 或 IsoStore,你不会注意到有多大区别.

Now, as far as performance. Reading the disk on the phone is not going to be fast. That being said, any solution you use is going to be saved to disk in the end; so I don't think you will notice much of a difference if you go with DB or IsoStore.

隔离存储概述
隔离存储最佳做法
芒果31天: 独立存储
使用独立存储在 Windows Phone 7 中

这篇关于使用内置本地数据库或独立存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆