Is there any browser to view the content of Berkeley DB file? - berkeley-db

For SQLite db we can use SQLite Browser to do CRUD operations and view the .db file. Are there any interface to view the content of a Berkeley DB file?

Berkeley DB includes a sqlite library wrapper (it's exactly an sqlite API) that should work with your sqlite browser.
Note that not all Berkeley DB databases can be used under the sqlite layer: there are some constraints on the data storage if the sqlite wrapper is used.
Using db_dump will display the key -> value pairs in a Berkeley DB in hex.

Related

Opening Sqlite DB encrypted using SQLite Encryption Extension with DB Browser with SqlCipher

I have a database I encrypted using SQLite Encryption Extension being used with MobileServiceSQLiteStore.
Is there anyway to use DB Browser with SqlCipher to view the database. I have the key that was used to decrypt the database.
No, SQLCipher is not compatible with the SQLite Encryption Extension. You may be able to use a command line shell compiled with SQLite Encryption Extension support to open the database.

Where is the actual physical storage for a Qt SQLite database?

If I setup a database like so:
QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
db.setHostName("localhost");
db.setDatabaseName("data.db");
Where is the file actually stored? Is there a way to set this and have control over that? I have heard that you can also opt for an SQLite database to only be stored in memory, not on disk. How would you do this?
setDatabaseName for SQLite works just as normal filenames. Unless you specify full path, the file is created in the process' working directory.
For memory storage, try to speci.fy ":memory:" as database name. See also Saving and restoring an in-memory SQLite database

How to backup/store between sqlite memory database and file database in Qt?

What's the easiest way to backup/restore sqlite memory database to file database in Qt.
I think you will need to work with SQLite directly to do this. SQLite has an Online Backup API, the first example is backing up an in-memory database to a file database, so it should be possible to do what you need to do.
To get a sqlite3* database handle, get the driver (QSqlDatabase::driver) from the database then get the handle (QSqlDriver::handle). The example code in the Qt docs shows how to cast the QVariant into a sqlite3* handle.

sqlite3 virtual tables lifetime

Can someone please tell me the lifetime of the virtual tables created in sqlite3. I have an android application with a search feature, and i want to use the fast text search feature of sqlite.
I do not know how long these tables stay in the system or if i need to create the tables each time i access the application.
Any help?
The SQLite FTS module creates several 'internal' tables for every virtual table you define. Those tables are plainly visible in the database schema, so FTS virtual tables as well as their underlying data are completely contained in the database file.
This might be different with other types of virtual table; e.g. the VirtualShape extension allows ESRI shapefiles (.shp) files to be read as tables; those are (naturally) stored separately from the SQLite database file.
In any case, the definition of any virtual table itself is stored in the database file, just like a normal table; so the answer to your question is:
No, there's no need to re-create them every time you open the database.
According the SQLite3 file format specification, the virtual table definitions are stored in the schema table like any other table. Any indices for a virtual table are also stored in the DB file.
I take all this to mean that a virtual table is stored in the DB file and thus persistent. You should not have to recreate it each time you open a DB connection - it wouldn't make much sense like that, anyway.
A simple test using the sqlite3 CLI tool and an FTS3 table confirms this :-)

convert sql-server *.mdf file into sqlite file

Just wondering if it is possible to convert sql-server *.mdf file into sqlite file ?
There's a C# utility to automatically do the conversion from SQL Server DB to SQLite DB on CodeProject
DBConvert for SQLite and MS SQL is a dependable bi-directional database converter which enables you to migrate data from SQLite to MS SQL server and from MS SQL to SQLite. DBConvert features: Unicode Support, Primary keys and Indexes conversion, Interactive multilingual (GUI) mode/command line mode, preverification of possible conversion errors, the ability to use MS SQL Dump if you don't have a direct access to MS SQL server, etc.
http://www.itshareware.com/prodview-code_65203--download-dbconvert-for-sqlite-and-mssql.htm
Couldnt find a free one for you!

Resources