热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

赞成和反对AndroidSQLite用法的论据-ArgumentsforandagainsttheAndroidSQLiteusage

IamunsureifIshoulduseornotAndroidSQLitedatabasewithmyAndroidprogram.我不确定我的Android程序是

I am unsure if I should use or not Android SQLite database with my Android program.

我不确定我的Android程序是否应该使用Android SQLite数据库。

The program has several tables, and I have operations for quering, updating and displaying these tables. However the total amount of data is not very large (maybe tens of rows at most).

该程序有几个表,我有操作来查询,更新和显示这些表。但是,数据总量不是很大(最多可能是几十行)。

I was told by some people that I should not use databases any more as storing everything into flat files is easier to implement, the finished implementation is easier to maintain and the database engine can be replaced by collection framework that stores pre-loaded flat files. These people have some weight in decision making so I need argumentation if I still want to use the database.

有些人告诉我,我不应再使用数据库,因为将所有内容存储到平面文件中更容易实现,完成的实现更容易维护,数据库引擎可以由存储预加载的平面文件的集合框架替换。这些人在决策中有一定的分量,所以如果我还想使用数据库,我需要论证。

Would it be possible to get argumentation when Android SQLite database should and when it should not be used?

当Android SQLite数据库应该和不应该使用时,是否可以获得论证?

1 个解决方案

#1


2  

The concept of a ContentProvider abstracts away from the actual technique used to persist your data. It allows you to nicely separate the implementation of your data source and the visualization of this data. In this respect, I don't think that easiness of implementation is a good argument for or against SQLite. If you use Cursors, you probably will use a ContentProvider anyway.

ContentProvider的概念远离用于保存数据的实际技术。它允许您很好地分离数据源的实现和此数据的可视化。在这方面,我认为实施的容易性不是支持或反对SQLite的好理由。如果您使用游标,则无论如何您可能会使用ContentProvider。

If you perform a lot of (complext) queries, the query performance might be an argument in favor of SQLite since this is what is is built for. Moreover, it seems much easier to debug an SQL database than a flat file.

如果执行大量(complext)查询,查询性能可能是支持SQLite的参数,因为这是为其构建的。而且,调试SQL数据库似乎比平面文件容易得多。


推荐阅读
author-avatar
exu8145079
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有