【学习】XML VS SQLite
来源:互联网 发布:化妆品数据分析 编辑:程序博客网 时间:2024/05/22 19:29
Advantages of sqlite over xml:
- everything in one file,
- performance loss is lower than XML as cache gets bigger,
- you can keep feed metadata separate from cache itself (other table), but accessible in the same way,
- SQL is probably easier to work with than XPath for most people.
Disadvantages of sqlite:
- can be problematic with multiple processes accessing same database (probably not your case),
- you should know at least basic SQL. Unless there will be hundreds of thousands of items in cache, I don't think you will need to optimize it much,
- maybe in some way it can be more dangerous from security standpoint (SQL injection). On the other hand, you are not coding web app, so this should not happen.
Here is a summary
For tree data, XML is much easier to query and modify using XPATH.
For small datasets (less than 10M), XML blew away sqlite in performance.
For large datasets (greater than 10M-100M), XML load time and memory usage became a big problem, to the point that some computers become unusable.
We couldn't get any opensource xml database to fix the problems associated with large datasets.
SQLITE doesn't have the memory problems of XML dom, but it is generally slower in processing the data (it is on the hard drive, not in memory). (note- sqlite tables can be stored in memory, perhaps this would make it as fast.... We didn't try this because we wanted to get the data out of memory.)
Storing and querying tree data in a table is not enjoyable. However, managing transactions and indexing partially makes up for it.
- 【学习】XML VS SQLite
- XML VS SQLite
- SQLite vs MySQL vs PostgreSQL
- VS生成sqlite.lib
- VS编译SQLite
- vs编译sqlite源码
- Android学习笔记 2 : Activity的源代码 xml vs Java
- VS 与 SQLite数据库 连接
- [iOS] SQLite vs. Core Data
- android SQLite getWritableDatabase VS getReadableDatabase
- sqlite学习
- SQLite 学习
- SQLite学习
- SQLite 学习
- SQLite学习
- sqlite学习
- SQLite学习
- SQLite学习
- 抽象类是否可继承实体类
- shell example
- SEP4020 spi 总线驱动的实现
- 关于linux中面板不能完整显示的问题
- 弹出消息框点击确定后跳转
- 【学习】XML VS SQLite
- js计算时间差
- Builder模式
- log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using N
- 多线程、高性能缓存服务实现代码
- android界面快速搭建
- Mysql wait_timeout interactive_timeout变量
- 【网上摘的】房价是怎么上去的,物价是怎么涨上去的?
- ListView保存滑动状态