什么是使用SQLite,而不是文件的优势在哪里? [英] What is the advantage of Using SQLite rather than File?

查看:241
本文介绍了什么是使用SQLite,而不是文件的优势在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Android的SQLite中输入数据使用更多的时间和c $ CS比.txt文件更多行的$。

In Android, entering data in SQLite uses more time and more lines of codes than in .txt file.

在.TXT保存数据,并使用的FileReader方便获取数据。

Saving data in .txt and use FileReader is convenient to get the data.

什么是使用SQLite,而不是文件的优势在哪里?

What is the advantage of Using SQLite rather than File ?

推荐答案

  • 如果您有与对方相关的数据,文件将不会允许你来联系他们。当时的SQLite会帮助你。
  • 如果您婉查询数据,存储结构化的方式中的数据,你WIL preFER的SQLite
  • 在SQLite的具有更高的性能
  • SQLite数据库也可以查询和数据检索是更健壮。
  • 的android.database和android.database.sqlite封装提供性能更高的替代方案,其中源兼容性不是一个问题。
  • 在Android的创建Android系统的数据库仅显示给创建它们的应用程序
  • 在没有文件的解析和生成code编写和调试。
  • 的内容可以使用强大的SQL查询,大大降低了应用code复杂性访问和更新。
  • 在扩展新功能的文件格式,在以后的版本是一个简单的添加新表或新列到现有的表。
  • 多元内容否则可能被存储为桩的档案可以封装成一个单一的磁盘文件中。
  • 的内容可以使用第三方工具查看。
  • 应用程序文件是可跨越所有的操作系​​统,32位和64位和大端和小端架构。
  • 应用程序只拥有,因为它需要,而不是看整个应用程序文件,并保持在内存中一个完整的解析装载尽可能多的数据。启动时间和内存消耗的减少。
  • 小编辑只覆盖该文件中的变化,而不是整个文件的部分,从而提高了性能并减少对SSD硬盘的磨损。
  • 内容不断和原子更新,没有工作,电源故障或崩溃时丢失。
  • 在应用程序可以利用全文搜索和RTREE功能内置于SQLite的。
  • 性能问题通常可以使用CREATE INDEX,而不是重新设计,重新编写,重新测试及应用code来解决。
  • 节目的联合,也许用不同的编程语言,都可以访问,没有兼容性问题同一个应用程序文件。
  • 多个进程可以连接至相同的应用程序文件和可读写而彼此相互干扰。
  • 交叉会话撤销/重做可以使用触发器来实现。
  • 在很多常见的情况下,从SQLite数据库加载内容的装入内容了单个文件的速度更快。参见内部与外部的BLOB以获取更多信息。
  • 存储在SQLite数据库内容更可能在将来可恢复的几十年中,原申请的所有痕迹已丢失后长。数据家住超过code。

Advantages of SQLite Database over File Storage

  • If you have data related with each other, file will not allow you to relate them. At that time SQLite will help you.
  • If you wan to query your data, store the data in structured manner you wil prefer SQLite
  • SQLite has higher performance
  • SQLite database can also be queried and the data retrieval is much more robust.
  • The android.database and android.database.sqlite packages offer a higher-performance alternative where source compatibility is not an issue.
  • Android-databases created in Android are visible only to the application that created them
  • There is no file parsing and generating code to write and debug.
  • Content can be accessed and updated using powerful SQL queries, greatly reducing the complexity of the application code.
  • Extending the file format for new capabilities in later releases is a simple as adding new tables or new columns to existing tables.
  • Diverse content which might otherwise be stored as a "pile-of-files" can be encapsulated into a single disk file.
  • The content can be viewed using third-party tools.
  • The application file is portable across all operating systems, 32-bit and 64-bit and big- and little-endian architectures.
  • The application only has to load as much data as it needs, rather than reading the entire application file and holding a complete parse in memory. Startup time and memory consumption are reduced.
  • Small edits only overwrite the parts of the file that change, not the entire file, thus improving performance and reducing wear on SSD drives.
  • Content is updated continuously and atomically so that there is no work lost in the event of a power failure or crash.
  • Applications can leverage the full-text search and RTREE capabilities that are built into SQLite.
  • Performance problems can often be resolved using CREATE INDEX rather than redesigning, rewriting, and retesting application code.
  • A federation of programs, perhaps written in different programming languages, can all access the same application file with no compatibility concerns.
  • Multiple processes can attach to the same application file and can read and write without interfering with each another.
  • Cross-session undo/redo can be implemented using triggers.
  • In many common cases, loading content from an SQLite database is faster than loading content out of individual files. See Internal Versus External BLOBs for additional information.
  • Content stored in an SQLite database is more likely to be recoverable decades in the future, long after all traces of the original application have been lost. Data lives longer than code.
  • 这篇关于什么是使用SQLite,而不是文件的优势在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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