From 63847496f14c813a5d80efd5b7de0f1294ffe1e3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 16:07:11 +0200 Subject: Adding upstream version 3.45.1. Signed-off-by: Daniel Baumann --- www/whentouse.html | 535 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 535 insertions(+) create mode 100644 www/whentouse.html (limited to 'www/whentouse.html') diff --git a/www/whentouse.html b/www/whentouse.html new file mode 100644 index 0000000..12f83f2 --- /dev/null +++ b/www/whentouse.html @@ -0,0 +1,535 @@ + + + + + +Appropriate Uses For SQLite + + + +
+ + + +
+
+Small. Fast. Reliable.
Choose any three. +
+ + +
+
+ + + +
+
+
+ + + + +

Appropriate Uses For SQLite

+ +

+SQLite is not directly comparable to client/server SQL database engines such +as MySQL, Oracle, PostgreSQL, or SQL Server since SQLite is trying to +solve a different problem. +

+ +

+Client/server SQL database engines strive to implement a shared repository +of enterprise data. They emphasize scalability, concurrency, centralization, +and control. +SQLite strives to provide local data storage for +individual applications and devices. SQLite emphasizes economy, +efficiency, reliability, independence, and simplicity. +

+ + +

+SQLite does not compete with client/server databases. +SQLite competes with fopen(). +

+ +

Situations Where SQLite Works Well

+ + + +

Situations Where A Client/Server RDBMS May Work Better

+ + + + + +

Checklist For Choosing The Right Database Engine

+ +
    +
  1. Is the data separated from the application by a network? + → choose client/server

    + +

    Relational database engines act as bandwidth-reducing data filters. +So it is best to keep the database engine and the data on +the same physical device so that the high-bandwidth engine-to-disk +link does not have to traverse the network, only the lower-bandwidth +application-to-engine link. + +

    But SQLite is built into the application. So if the data is on a +separate device from the application, it is required that the higher +bandwidth engine-to-disk link be across the network. This works, but +it is suboptimal. Hence, it is usually better to select a client/server +database engine when the data is on a separate device from the +application. + +

    Nota Bene: +In this rule, "application" means the code that issues SQL statements. +If the "application" is an application server and +if the content resides on the same physical machine as the application server, +then SQLite might still be appropriate even though the end user is +another network hop away.

    +
  2. + +
  3. Many concurrent writers? → choose client/server

    + +

    If many threads and/or processes need to write the +database at the same instant (and they cannot queue up and take turns) +then it is best to select a database engine that supports that +capability, which always means a client/server database engine. + +

    SQLite only supports one writer at a time per database file. +But in most cases, a write transaction only takes milliseconds and +so multiple writers can simply take turns. SQLite will handle +more write concurrency than many people suspect. Nevertheless, +client/server database systems, because they have a long-running +server process at hand to coordinate access, can usually handle +far more write concurrency than SQLite ever will. +

  4. + +
  5. Big data? → choose client/server

    + +

    If your data will grow to a size that you are uncomfortable +or unable to fit into a single disk file, then you should select +a solution other than SQLite. SQLite supports databases up to +281 terabytes in size, assuming you can find a disk drive and filesystem +that will support 281-terabyte files. Even so, when the size of the +content looks like it might creep into the terabyte range, it would +be good to consider a centralized client/server database. +

  6. + +
  7. Otherwise → choose SQLite!

    + +

    For device-local storage with low writer concurrency and less than a +terabyte of content, SQLite is almost always a better solution. SQLite +is fast and reliable and it requires no configuration or maintenance. +It keeps things simple. SQLite "just works". +

  8. +
+ + -- cgit v1.2.3