简体   繁体   English

Android sqlite-store大文件

[英]Android sqlite-store large file

I am using sqlite DB in my android application.(created the db in sdcard) 我在Android应用程序中使用sqlite DB。(在sdcard中创建了db)

is this possible to insert single large file into db.(say around 20-30mb) 这是否可以将单个大文件插入db。(例如20-30mb左右)

if not what is the alternative solution.and what is the size limitation to insert 如果不是,替代解决方案是什么?插入的大小限制是多少

For size limitations, see this post . 有关大小限制,请参阅此文章

An alternative is to place whatever this "large file" is in the assets folder. 一种替代方法是将这个“大文件”放在assets文件夹中。

What exactly is the scenario? 到底是什么情况?

SQLite can handle large amount of data, the problem here is the device's limits. SQLite可以处理大量数据,这里的问题是设备的限制。 If you are going to store more than 10MB , you should consider saving that data in an external server and access it via the Internet. 如果要存储10 MB以上的内存,则应考虑将数据保存在外部服务器中并通过Internet访问。 If you are building an application that use large amount of data, usually the application don't use all data all the time, so you can save in cache (in a local database) . 如果要构建使用大量数据的应用程序,通常该应用程序不会一直使用所有数据,因此您可以将其保存在缓存中(在本地数据库中)。 if your db file is limited in size less than 10 MB you can encrypt them and put it in the sdcard 如果您的数据库文件的大小限制为小于10 MB,则可以对其进行加密并将其放入sdcard

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM