Questions tagged [sqlite]

SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.

SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world. The source code for SQLite is in the public domain.

SQLite is a relational database management system contained in a small (~350 KB) C programming library. In contrast to other database management systems, SQLite is not a separate process that is accessed from the client application, but an integral part of it.

SQLite is ACID-compliant and implements most of the SQL standard, using a dynamically and weakly typed SQL syntax that does not guarantee the domain integrity.

Making an MRE for SQLite questions on StackOverflow

Providing a minimal reproducible example for an SQLite-related question is most usefully and conveniently done by showing a few lines in SQLite syntax (i.e. some create table ... and insert ... which make a tailored toy database with appropriate structure and sample data).

This way, potential answerers can easily recreate the database you used for demonstrating the problem and quickly and efficiently provide solution proposals that are supported by test runs and test output. Showing pictures of database viewers or table representations (even in ASCII art) does not provide the same benefits.

If you already have created a database for demonstration purposes, consider using the .dump command of the SQLite commandline tool. It will automatically give you the lines for exactly recreating the database.

Getting familiar with the commandline tool also is a good way of avoiding all potential errors in whatever programming language is used to handle the database. With the commandline tool, you can inspect and analyse data and structure directly.

Mobile Apps

SQlite is commonly used to store data on Android, iOS, and Windows Phone apps since it has a simple implementation, easy to adapt, and quite fast.

Design

Unlike client-server database management systems, the SQLite engine has no standalone processes with which the application program communicates. Instead, the SQLite library is linked in and thus becomes an integral part of the application program.

The application program uses SQLite's functionality through simple function calls, which reduce latency in database access: function calls within a single process are more efficient than inter-process communication. SQLite stores the entire database as a single cross-platform file on a host machine.

References

Books

88183 questions
14
votes
8 answers

Using SQLite in a Python program

I have created a Python module that creates and populates several SQLite tables. Now, I want to use it in a program but I don't really know how to call it properly. All the tutorials I've found are essentially "inline", i.e. they walk through using…
crystalattice
  • 4,733
  • 9
  • 38
  • 56
14
votes
6 answers

Get SQLite database from Android app

I need get SQLite database from Android app from Genesis device where user has populated by hand. How I can create another app or any other way to get this db and save in place where I can get? obs.: the device has root Thanks
Paulo Kussler
  • 171
  • 1
  • 3
  • 10
14
votes
2 answers

simple query: not implemented by SQLite JDBC driver

First crack at using SQLite+Java and I'm recieving an error when I attempt to execute a simple simple query. Error: not implemented by SQLite JDBC driver Query: String sql = "select Asset, Qty*Price+Fees as Cost \n" + "from …
Jefferey Cave
  • 2,054
  • 1
  • 22
  • 41
14
votes
2 answers

How to use SQLiteAsyncConnection from the async PCL version of SQLite?

I'm using a PCL version of Sqlite.net from https://github.com/oysteinkrog/SQLite.Net-PCL However, I'm unable to get the DB connection setup. The SQliteAsyncConnection does unlike the original version not take a string (path to the DB), but a [Func<…
Krumelur
  • 29,920
  • 21
  • 114
  • 240
14
votes
5 answers

java.lang.OutOfMemoryError on storing images in sqlite db

I want to store images in my database. Also I want to check that if the image and title is already in the database. If so, it will not add them to the database. This is my class. Attractions public class Attractions extends ListActivity…
Jeongbebs
  • 3,796
  • 6
  • 30
  • 57
14
votes
2 answers

What is the advantage of Using SQLite rather than File?

In Android, entering data in SQLite uses more time and more lines of codes than in .txt file. Saving data in .txt and use FileReader is convenient to get the data. What is the advantage of Using SQLite rather than File ?
user2986288
  • 145
  • 1
  • 1
  • 6
14
votes
3 answers

Updating an SQLite database via an ODBC linked table in Access

I am having an issue with an SQLite database. I am using the SQLite ODBC from http://www.ch-werner.de/sqliteodbc/ Installed the 64-bit version and created the ODBC with these settings: I open my Access database and link to the datasource. I can…
Herrozerro
  • 1,321
  • 1
  • 19
  • 32
14
votes
3 answers

Which database engine is best for node.js apps?

I am looking for a database engine which is the best for storing thousands of records. I first wanted to use MySQL, because I know it best, but I'd like to have strong answer. I need predefined columns, database can be as small as 10 MB or as "big"…
kfasny
  • 225
  • 1
  • 2
  • 8
14
votes
1 answer

SQLite Query using nested SELECT

I'm trying to select cpu_time from the db, but the time must correspond with a few other criteria - i.e. build_version, test_letter, design_index, multi_thread, and test_index What I thought would work was (the inner SELECT DISTINCT statement works…
user234207
14
votes
1 answer

GROUP_CONCAT in SQLite

I am having data like this 1 A 1 B 1 C 1 D 2 E 2 F 3 G 3 H 3 I 3 J 3 K by using this query select ABSTRACTS_ITEM._id,Name from ABSTRACTS_ITEM , ABSTRACT_AUTHOR , AUTHORS_ABSTRACT where ABSTRACTS_ITEM._id =…
user2579475
  • 903
  • 3
  • 10
  • 19
14
votes
3 answers

Concurrent writing with sqlite3

I'm using the sqlite3 python module to write the results from batch jobs to a common .db file. I chose SQLite because multiple processes may try to write at the same time, and as I understand it SQLite should handel this well. What I'm unsure of is…
Shep
  • 6,997
  • 3
  • 42
  • 65
14
votes
5 answers

SQLite dll for x86/x64 architectures

I am developing a program in VB.net, and using System.Data.SQLite Precompiled Binaries for .NET, However It is not working for x64 Architectures, and I am getting the classic culture problem and not loading correct…
edgarmtze
  • 23,307
  • 73
  • 221
  • 364
14
votes
2 answers

sqlite get name of attached databases

How do I get the name of the Attached databases in SQLite? I've tried looking into: SELECT name FROM sqlite_master but there doesn't seem to be any information there about the attached databases. I attach the databases with the command: ATTACH…
マルちゃん だよ
  • 1,654
  • 3
  • 17
  • 25
14
votes
4 answers

Installing SQLite 3.6 On Windows 7

How do I install SQLite 3.6 on Windows 7? I extracted sqlite3.exe, sqlite3.dll, and sqlite3.def to C:\Windows\System32 but when I try to run a Ruby program that requires the use of sqlite3, I get this error: The program can't start because…
RyanScottLewis
  • 11,576
  • 13
  • 51
  • 82
14
votes
4 answers

How to insert duplicate rows in SQLite with a unique ID?

This seems simple enough: I want to duplicate a row in a SQLite table: INSERT INTO table SELECT * FROM table WHERE rowId=5; If there were no explicit unique column declarations, the statement would work, but the table's first column is declared…
Ed Marty
  • 39,011
  • 19
  • 96
  • 153
1 2 3
99
100