= SQLite =
== Download ==
* [[http://sqlite.org/download.html|SQLite database engine]]
* [[http://sqlitebrowser.org|DB Browser for SQLite]]
* [[https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager/|SQLite Manager (Firefox)]]
== Create Database ==
Method 1: Create a database schema using a file:
$ sqlite3 mydatabase.db < db.schema
Method 2: Create schema manually (and then enter SQL commands at the prompt to create and populate the new tables):
$ sqlite3 mydatabase.db
sqlite> create table greetings(one varchar(10), two smallint);
sqlite> insert into greetings values('hello!',10);
sqlite> insert into greetings values('goodbye', 20);
sqlite> select * from greeting;
$ sqlite3 mydatabase.db
sqlite> CREATE TABLE product (
...> id int(11) primary key autoincrement,
...> name varchar,
....> description text,
...> price real
...> );
sqlite>
Method 3: Create table by importing CSV file:
$ sqlite3 mydatabase.db
sqlite> .mode csv
sqlite> .import C:/work/somedata.csv tab1
== Alter Table ==
ALTER TABLE table_name
ADD new_column_name column_definition;
== SQLite Client ==
* [[swdev:sqlite:Custom client in Csharp|Custom client in C#]]
== References ==
* CLI: [[http://sqlite.org/cli.html]]
* [[https://www.techonthenet.com/sqlite|TechOnTheNet: SQLite]]
* [[https://www.scriptol.com/sql/sqlite-async-await.php|SQLite async/await]]
* [[https://www.geeksforgeeks.org/using-async-await-in-node-js|Node JS using async/await]]
* [[https://github.com/mapbox/node-sqlite3/wiki/API|SQLite3 API for Node JS]]
* [[https://github.com/mapbox/node-sqlite3/blob/master/examples/simple-chaining.js|SQLite3 Simple Chaining in Node JS]]