163
votes
Accepted
Why are concurrent writes not allowed on an SQLite database?
Because "multiple concurrent writes" is much, much harder to accomplish in the core database engine than single-writer, multiple-reader. It's beyond SQLite's design parameters, and including it would ...
50
votes
Accepted
What is a realistic, real-world, maximum size for a SQLite database?
The realistic limit (of the size of some Sqlite database) is the same as the realistic limit for a data file. And that limit depends a lot of your computer & system. On my current Linux desktop I ...
23
votes
Accepted
Where to store SQLite Database file?
Store the words using a text format, and build a database during the build.
Instead of storing the information in binary format and storing the binary file in the version control, keep the pairs in a ...
12
votes
Why are concurrent writes not allowed on an SQLite database?
Because there's no server which can tell whether things are to be written to the same place or not. There are just two processes trying to write to a file.
As pointed in a comment, concurrent writes ...
11
votes
Accepted
Why shouldn't I be using SQLITE instead of the INI format in all cases?
I think the problem is your definition of application settings.
I think most people would designate your "partial and full downloads" as application state rather than application settings, ...
10
votes
Should I use a plain text database, or SQLite?
making queries on things like temperature to sales of specific
categories of products
This (Queries) is one area relational databases are designed for. You are better off with a database with SQL ...
9
votes
Storing settings in a table in my SQLite database or separately?
I don't agree that storing settings in a database table is a bad separation of concerns. Your "concerns" will be separated by not defining a relationship between the settings table and other tables in ...
7
votes
Should I use a plain text database, or SQLite?
I asked the same question years ago and actually built the app both ways. The build-my-own database version was a lot of fun, but it was a toy. Using a real database enabled a commercial product ...
7
votes
Accepted
For what kind of websites is it ok or even better to use SQLite?
Sqlite is an in-process database, which means that its performance characteristic is going to be similar to a well optimized application that uses a file to store data.
In an IaaS or PaaS cluster, ...
7
votes
Accepted
SQLite database as a data interchange format?
It happens to be possible to use SQLite databases as a data interchange format, but it's not a particularly good solution. Why?
You are looking for a compact data exchange format. In contrast, SQLite'...
5
votes
Accepted
Storing settings in a table in my SQLite database or separately?
The largish legacy application I maintain has gone back and forth on this over the years, but has evolved towards keeping most settings in the DB. Yes, the DB connection string is read from the config ...
5
votes
Should i use Sqlite integer as a datatype for my primary key column?
You should look into what kind of barcode the books are using you are going to store. Take a look here for more information about bar codes https://barcode.tec-it.com/en/EAN13?data=978020137962
You ...
4
votes
Accepted
Why does Google Chrome use SQLite if the usage of threads results in parallel access?
Because SQLite is a simple self-contained library, and because most SQLite databases (on an Android tablet or Google Chrome computer) are very probably accessed by only one (or a few) processes or ...
4
votes
Accepted
Bundling of related boolean values for an SQLite database or keeping them separate?
There are a couple benefits to storing the day of the week as a bitarray.
Fewer resources - as you've said, there would be 7 integer columns to support a separated day of the week schema. This ...
4
votes
For what kind of websites is it ok or even better to use SQLite?
SQLite is an in-process database. If you are only ever going to have a single process running your website, then it is fine. If you ever need to have more than one process (and likely even more than ...
4
votes
Accepted
Is it possible to query data in a RDMS without writing SQL?
The RDBMS are all based on the same underlying ceoncept of Codd's relational algebra. SQL provides a language that is based on these underlying concepts. So, it's a kind of natural fit. This is the ...
3
votes
Accepted
What is the .sqlite file for?
The .sqlite file is the complete database. It's one of the big features of sqlite in that it's single-file with binary compatibility between platforms.
From the About SQLite page (emphasis added):
...
3
votes
Bundling of related boolean values for an SQLite database or keeping them separate?
@Samuel's answer is fine, nevertheless I like to play the devil's advocate here and argue for a slightly different point of view. IMHO
It is - more or less - a matter of taste.
If you store one or ...
3
votes
Accepted
TEXT column as key for a table when there are other tables referencing that table?
The reason i can see for continue using a standard “rowid column” (integer with autoincrement) is that the name could change and in these cases i will have to update the tables which holds relations ...
3
votes
Accepted
Is it true that ORM allows for changing the type of SQL that you use easily?
Being able to change the actual database is not an intrinsic property of ORM, but many (most?) ORM libraries do provide that ability.
The main goal of an ORM is to bridge the gap between the RDBM ...
3
votes
Is it true that ORM allows for changing the type of SQL that you use easily?
Yes and no.
While a lot of ORMs offer this functionality and it usually works just fine when you actually have real production data you will most likely realize that this is just small part of the ...
3
votes
Accepted
File based database via smb
Local file handling and network access may be subtly different in hard to reproduce ways. Often such warnings about not using network files for databases (where integrity is of utmost importance) stem ...
3
votes
Accepted
Data Class: spread boilerplate for each different database over multiple class copies, or add complexity to original class?
Rule of thumb:
If 80% to 90% of the code will be equal, and you have to maintain only 10 to 20% of invidual fields for each storage type, keep it in one class. For example, in your example, you have ...
2
votes
Why is Web SQL database deprecated?
Just posting to let you know that
just because WebSQL is deprecated/removed/unsupported in all the crappy browsers, you don't need to use IndexedDb.
You can use SQLite via WebAssembly or JS-...
2
votes
Bundling of related boolean values for an SQLite database or keeping them separate?
Another possibility is to take a hybrid approach by using a view to supplement your table:
CREATE TABLE Reminders (
ReminderID INTEGER PRIMARY KEY,
Description VARCHAR,
WeekdayFlags ...
2
votes
How to quickly present 1000s of pictures in a jlist
You can use a ListModel to return placeholder values until things get loaded. On startup you only load and cache the first few dozen. then when the value is requested to fire off a task using ...
2
votes
Accepted
Where should I store the SQLLite file when it is shared between a web and a desktop app?
You mentioned the external application and the website exist on the same server, so in some respects, it really doesn't matter where it is stored. The only thing that matters is what permissions the ...
2
votes
Converting one-to-many relationships into relations
This is a many-to-one relationship. A typical way to implement this is for each Performer row to have a foreign key field that holds the value of the related agents primary key.
So, no, it is not ...
2
votes
Accepted
Can one Sqlite db support interaction by two server programs all on the raspberry pi
Yes, SQLite supports this.
Historically, the concurrency model in SQLite worked like this:
Readers don't block other readers, and
Writers block all other readers and writers during the short time ...
2
votes
Accepted
Using UNIQUE (col1, col2) or using a composite primary key for a relation table in SQLite/SQL?
I know two reasons for using an id column in that situation:
if you have a strict convention to give every table in your database a single primary key named id
if you cannot exclude the possibility ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
sqlite × 69database × 19
android × 10
database-design × 7
sql × 7
mysql × 5
design × 4
sql-server × 4
synchronization × 4
java × 3
python × 3
web-development × 3
ios × 3
storage × 3
local-storage × 3
design-patterns × 2
c++ × 2
data-structures × 2
performance × 2
web-services × 2
data × 2
concurrency × 2
memory × 2
postgres × 2
database-development × 2