什么阻止我使用独立的JSON文件而不是本地DB?
我需要存储我正在编写的本机移动应用程序中的数据,我想知道:'当我只能读/编写JSON文件时,为什么需要打扰DB设置?所有的交互都是基本的,很可能被解析为JSON对象而不是查询。
- 有什么优势?
I need to store data for a native mobile app I'm writing and I was wondering: 'why do I need to bother with DB setup when I can just read/write a JSON file?. All the interactions are basic and could most likely be parsed as JSON objects rather than queried.
- what are the advantages?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
数据库目的是使用标准化数据或大数据集。如果您知道只有几个属性要读取,并且不会更改,那么JSON可能会更容易,但是如果您有项目列表,DB可以通过索引优化查询或通过多个表确保一致性
DB are intent to work with standardized data or large data sets. If you know that there is only a few properties to read and it's not changing, JSON may be easier, but if you have a list of items, a DB can optimize the queries with index or ensure consistency through multiple tables