android数据库迁移
Distribution of power and information among local governments
地方政府之间权力和信息的分配
Mobile computing devices including smartphones, personal digital assistants (Discontinued), tablet computers and wearable devices are used to store data and share them among the networks. It gives the user vast advantages for the distribution of data and saving cost and time.
中号 obile计算设备,包括智能电话,个人数字助理(停产),平板计算机和可佩戴装置被用于存储数据和所述网络之间共享它们。 它为用户提供了数据分配,节省成本和时间的巨大优势。
Instead of maintaining the central database and consuming the datastore for communication every time they need it, it can be used the mobile database as a cost-effective valuable solution. Not only that, by using the mobile database we can save additional cost for data communication among the server and mobile devices. Many applications require to download data and information from the data sources and need to operate the information even when out of range and disconnected the network. Specially workload to communicate between devices and servers (Client-Server Communications). But, it is a disadvantage for providing better performance of the applications and devices. Therefore, developers and researches need to invent a new process for performing better performance. As a result of many kinds of research mobile computing technology with a mobile database had been produced.
与其维护中央数据库并在每次需要时使用数据存储进行通信,不如将移动数据库用作具有成本效益的有价值的解决方案。 不仅如此,通过使用移动数据库,我们可以节省服务器和移动设备之间的数据通信的额外成本。 许多应用程序需要从数据源下载数据和信息,并且即使超出范围并断开网络连接也需要操作信息。 专门用于在设备和服务器之间进行通信的工作负载( 客户端-服务器通信 )。 但是,这对于提供更好的应用程序和设备性能是不利的。 因此,开发人员和研究人员需要发明一种新的过程来执行更好的性能。 作为许多研究的结果,已经产生了具有移动数据库的移动计算技术。
Mobile databases are separate from the main database and can easily be transported to various places even though they are not connected to the main database. They can still communicate with each other to share the data and exchange the data. the mobile database includes a few features. they are as follows.
移动数据库与主数据库是分开的,即使它们未连接到主数据库,也可以轻松地传输到各个地方。 他们仍然可以相互通信以共享数据和交换数据。 移动数据库包含一些功能。 它们如下。
The main system database that stores all the data and is linked to the mobile database. 存储所有数据并链接到移动数据库的主系统数据库。 The mobile database that allows users to view information even while on the move. It shares information with the main database. 移动数据库,允许用户即使在移动中也可以查看信息。 它与主数据库共享信息。 The device uses the mobile database to access data. This device can be a mobile phone, laptop, tablet computers, and wearable devices. 设备使用移动数据库访问数据。 该设备可以是手机,笔记本电脑,平板电脑和可穿戴设备。 A communication link that allows the transfer of data between the mobile database and the main database. 一个通信链接,允许在移动数据库和主数据库之间传输数据。Most of the time Android uses SQLite as a mobile database technology. SQLite is a relational database that is used in various embedded on iOS and Android platforms. It has a public license so that anybody can use it under the public domain. SQLite is a C programming library and is about 500KiB in size. A majority of Android application developers use SQLite. It has many advantages and disadvantages. They are as follows:
大多数时候,Android使用SQLite作为移动数据库技术。 SQLite是一个关系数据库,可用于iOS和Android平台上的各种嵌入式数据库。 它具有公共许可证,因此任何人都可以在公共领域使用它。 SQLite是一个C编程库,大小约为500KiB。 大多数Android应用程序开发人员都使用SQLite。 它有很多优点和缺点。 它们如下:
Advantages of SQLite
SQLite的优点
It can be used via Toolchain. ex: DB browser. 可以通过工具链使用。 例如:数据库浏览器。 There are no major dependencies. 没有主要的依赖关系。 The developers can define data schema and structure as they want. 开发人员可以根据需要定义数据模式和结构。 The developers have full access to create and manipulate the database. 开发人员具有创建和操作数据库的完全访问权限。 Developers can grab the database and analyze it. 开发人员可以获取数据库并进行分析。 Easy to write content providers to use with loaders. 易于编写的内容提供程序,可与加载程序一起使用。Disadvantages of SQLite
SQLite的缺点
There is a lot of boilerplate code. 有很多样板代码。 Tools do the work already. 工具已经完成了工作。 Content providers are another layer. 内容提供商是另一层。 No compile-time checking process. 没有编译时检查过程。 Manual schema updates (maintenance, migration scripts) 手动模式更新(维护,迁移脚本) SQL is another language. SQL是另一种语言。 Testability. 可测试性。 SQL queries can get longer. SQL查询可能会更长。There are a lot of SQLite alternatives that have been produced as the solutions for SQLite disadvantages. if you are unhappy with SQLite and boilerplate code, you can use an object abstraction on top of SQLite. It has done by using ORM (Object Relational Mapping). However, If you want to replace SQLite completely, you can use many alternatives such as Couchbase Lite, Interbase, LevelDB, Oracle Berkeley DB, Realm, SnappyDB, Sparksee Mobile, SQL Anywhere, SQL Server Compact (discontinued), and UnQLite.
已经有很多SQLite替代品作为SQLite劣势的解决方案。 如果您对SQLite和样板代码不满意,可以在SQLite之上使用对象抽象。 通过使用ORM(对象关系映射)来完成。 但是,如果要完全替换SQLite,则可以使用许多替代方法,例如Couchbase Lite,Interbase,LevelDB,Oracle Berkeley DB,Realm,SnappyDB,Sparksee Mobile,SQL Anywhere,SQL Server Compact(已停产)和UnQLite。
Some of the SQLite alternatives listed below with the comparison.
下面列出了一些SQLite替代方案并进行了比较。
SQLite alternatives with the comparison SQLite替代品与比较I will explain and update NoSQL in mobile from this article with how to implement the SQLite database and ORM in Android application development.
我将从本文的移动设备中解释和更新NoSQL ,了解如何在Android应用程序开发中实现SQLite数据库和ORM。
翻译自: https://levelup.gitconnected.com/mobile-databases-in-android-c968c9a9d1b7
android数据库迁移
相关资源:微信小程序源码-合集6.rar