Questions tagged [sqlite]

A popular open-source embeddable (i.e. non client-server) RDBMS implemented as a C library.

SQLite is a C library that manages an in-memory or persistent database structure. It does not have a separate server, but links directly into the application. Many language bindings for SQLite are available, The Wikipedia entry has a list under the 'Features' section.

SQLite is used by a variety of commercial and open-source applications, and is developed by the SQLite consortium. The system is donated to the public domain although the consortium will grant explicit licenses.

710 questions
162
votes
9 answers

How to properly format sqlite shell output?

If I go to mysql shell and type SELECT * FROM users I get - +--------+----------------+---------------------------------+----------+-----------+--------------------+--------------------+ | USERID | NAME | EMAILID |…
Kshitiz Sharma
  • 3,357
  • 9
  • 33
  • 35
56
votes
4 answers

Is it possible to store and query JSON in SQLite?

I need to store JSON objects in a SQLite database, and then do complex queries on it. I did a table like this: +--------------------------------------+ |document | property | string | number| +--------------------------------------+ |foo | …
tuxlu
  • 561
  • 1
  • 4
  • 3
44
votes
2 answers

Is it possible to use SQLite as a client-server database?

Are there any techniques or tools to work with SQLite on a medium size/traffic/concurrency DB environment?
Maniero
  • 2,758
  • 6
  • 28
  • 29
38
votes
3 answers

For absolute performance, is SUM faster or COUNT?

This relates to counting the number of records that match a certain condition, e.g. invoice amount > $100. I tend to prefer COUNT(CASE WHEN invoice_amount > 100 THEN 1 END) However, this is just as valid SUM(CASE WHEN invoice_amount > 100 THEN 1…
孔夫子
  • 4,330
  • 3
  • 30
  • 50
24
votes
1 answer

Limits of SQLite

How far can one take the sqlite database from a single-user , embedded , prototype oriented db engine ?
mumtaz
  • 777
  • 1
  • 7
  • 10
24
votes
2 answers

Storing prices in SQLite, what data-type to use?

I am using SQLite and need to store prices. SQLite's REAL data-type says it uses floating-point which is unacceptable storage for prices. Is there a data-type besides TEXT that I can use to store prices numerically so they sort correctly?
unixman83
  • 343
  • 1
  • 2
  • 6
19
votes
2 answers

Can a database table not have a primary key?

Can a database table not have a primary key? SQLite lets you define a table with no primary key therefore there can be no insertion anomaly.
user138363
  • 199
  • 1
  • 1
  • 3
17
votes
1 answer

How do I prevent SQLite database locks?

From SQLite FAQ I've known that: Multiple processes can have the same database open at the same time. Multiple processes can be doing a SELECT at the same time. But only one process can be making changes to the database at any moment in time,…
Andrei Orlov
  • 537
  • 2
  • 4
  • 12
17
votes
1 answer

Why is this sqlite query much slower when I index the columns?

I have a sqlite database with two tables, each with 50,000 rows in, containing names of (fake) people. I've constructed a simple query to find out how many names there are (given name, middle initial, surname) that are common to both tables: select…
chiastic-security
  • 273
  • 1
  • 2
  • 7
14
votes
4 answers

Scripting SQLite with dot commands

Is it possible to write scripts that contain SQLite dot commands ( vis. .read file.sql; .separator ,; .import file.csv; )? I'm building and repeatedly rebuilding an SQLite database and need to type in roughly twenty four dot command statements every…
StudentsTea
  • 341
  • 1
  • 2
  • 8
13
votes
1 answer

Can I use SQLite to share data among different applications?

Can I use SQLite as a database to which 2 or more applications connect? I.e. can I use it to share data among different applications?
Pietro
  • 619
  • 3
  • 9
  • 19
13
votes
1 answer

Text string stored in SQLite Integer column?

I'm a database novice looking at an SQLite database which appears to be storing text in an integer column. Here's an example session at the sqlite3 command line: sqlite> .schema mytable CREATE TABLE mytable ( id integer primary key,…
igal
  • 345
  • 1
  • 2
  • 9
12
votes
4 answers

select all rows with a minimum value

In Sqlite 3 I'm trying to figure out how to select rows based on a minimum value. I think that I'm limited by not knowing enough of the related terminology to effectively search google. The table looks like: num text num2 …
user35292
  • 123
  • 1
  • 1
  • 6
12
votes
1 answer

How to reduce size of a large SQLite database with series data

I'm considering to use SQLite database for a C# application which deals with large volumes of data series. The data is currently in several CSV files of up to 20GBs in size each and of the following format: 2019.07.31…
yaugenka
  • 455
  • 1
  • 5
  • 13
12
votes
5 answers

How to check what Database Engine is installed on the DataBase server that I have acces to run queries on?

I want to check what type of sql is running on a Datasase server that I can access. I only have access to a web interface and a list of tables. Through the interface I can run queries on the tables that are present on a list. How can I get more…
yoyo_fun
  • 255
  • 1
  • 2
  • 7
1
2 3
47 48