Skip to main content
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 ...
Jonathan Eunice's user avatar
53 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 ...
Basile Starynkevitch's user avatar
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 ...
Arseni Mourzenko's user avatar
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 ...
Stop harming Monica's user avatar
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, ...
Ewan's user avatar
  • 77.4k
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 ...
Low Flying Pelican's user avatar
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 ...
Bill the Lizard's user avatar
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'...
amon's user avatar
  • 135k
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 ...
GlenPeterson's user avatar
  • 14.9k
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, ...
Lie Ryan's user avatar
  • 12.4k
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 ...
Mr Zach's user avatar
  • 269
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 ...
Samuel's user avatar
  • 9,197
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 ...
Caleth's user avatar
  • 11.4k
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 ...
Christophe's user avatar
  • 78.6k
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 ...
Bent's user avatar
  • 2,576
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): ...
Bryan Oakley's user avatar
  • 25.3k
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 ...
Doc Brown's user avatar
  • 210k
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 ...
Bart van Ingen Schenau's user avatar
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 ...
wasatz's user avatar
  • 3,515
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 ...
Hans-Martin Mosner's user avatar
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 ...
Doc Brown's user avatar
  • 210k
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 ...
ratchet freak's user avatar
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-...
Quandary's user avatar
  • 393
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 ...
dan04's user avatar
  • 3,959
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 ...
candied_orange's user avatar
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 ...
Berin Loritsch's user avatar
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 ...
Robert Harvey's user avatar
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 ...
Doc Brown's user avatar
  • 210k
2 votes

Is it possible to query data in a RDMS without writing SQL?

SQL is one of many languages that can be used to query relational databases. There have been a lot of improvements and alternatives proposed over the last 50 years. The Third Manifesto is a well-...
Jörg W Mittag's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible