An SQLite database is one file
A really cool feature of SQLite is that a database is really just one ordinary file.
This file can be copied from one computer to another, even from
Windows to
Linux and vice versa.
At times, there is no need to even have a file. In such cases, a transient SQLite database can be created completely in memory.
Turning off autocommit
SQLite commits every statement by default (so called auto commit).
To turn this behaviour off (which increases performance greatly when lots of statements are executed in sequence), the statements must be enclosed in begin transaction
.. commit transaction
:
begin transaction;
insert into tab_something values ('foo', 'bar', 'baz');
insert into tab_something values ('one', 'two', null);
…
…
commit transaction;