SQLite

SQLite3 Databases on Stablepoint

SQLite is a flat file database engine used in many embedded systems. It's the most widely distributed type of database around the world because of its simplicity. Many programming languages provide interfaces for dealing with SQLite databases, for example, PHP, Python, Ruby and Perl amongst others.

Access control to SQLite databases is handled by file system permissions given to the database file itself (e.g. 600 permissions). Another implication of the serverless design is that several processes may not be able to write to the database file. SQLite relies on file-system locks to handle multiple processes writing to the same database. It has less knowledge of the other processes that are accessing the database at the same time and so SQLite is not the preferred choice for write-intensive deployments. However, for simple queries with little concurrency, SQLite has very fast performance from avoiding the overhead of passing its data to another process.

At Stablepoint all of our shared hosting systems support the SQLite3 database version. Connecting to an SQLite3 database is a simply case of creating a new SQLite3 object, passing the database file name as a parameter, for example:-

$db = new SQLite3($db_name);
$result = $db->query("SELECT * FROM your_table_name");

To read more about SQLite and using it in your code, feel free to reference the PHP manual here:-
https://www.php.net/manual/en/class.sqlite3.php


Did this page help you?