sqlite内存模式支持持久化到本地吗? [英] sqlite memory mode support persistence to local?

查看:949
本文介绍了sqlite内存模式支持持久化到本地吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道内存数据库的含义,剂量sqlite是内存数据库吗? 在这种模式下,是否支持将持久性数据保存到本地文件?

i didn't know what's meaning of memory database,dose sqlite is a memory database? on this mode,is it support persistence data to local file?

推荐答案

内存数据库支持所有操作和数据库访问语法,但实际上并不持久.它只是内存中的数据结构.这使其速度很快,并且非常适合开发人员试验和(相对少量)临时数据,但不适用于您希望数据得以持久化的任何事物(它持久化了真正需要花费的数据,但这是原因之一.使用数据库)或总数据集大于您可以舒适地容纳在可用物理内存中的位置.

An in-memory database supports all operations and database access syntax, but doesn't actually persist; it's just data structures in memory. This makes it fast, and great for developer experimentation and (relatively small amounts of) temporary data, but isn't suited to anything where you want the data to persist (it's persisting the data that really costs, yet that's the #1 reason for using a database) or where the overall dataset is larger than you can comfortably fit in your available physical memory.

SQLite数据库是与特定文件或伪文件":memory:"耦合创建的,伪文件":memory:"在您需要内存数据库时使用.打开数据库时,无法更改数据库的位置;关闭数据库时,将关闭内存数据库.持久存储的唯一方法是使用查询从其中提取数据并将其写入其他位置(例如,磁盘数据库或某种转储文件).

SQLite databases are created coupled to a particular file, or to the pseudo-file ":memory:" which is used when you're wanting an in-memory database. You can't change the location of a database while it is open, and an in-memory database is disposed when you close its connection; the only way to persist it is to use queries to pull data out of it and write it to somewhere else (e.g., an on-disk database, or some kind of dump file).

这篇关于sqlite内存模式支持持久化到本地吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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