-
Notifications
You must be signed in to change notification settings - Fork 0
sqlite
Let us first tackle the question, what is SQL?
SQL, which stands for Structured Query Language, is a computer language that was designed for the manipulation and management of data stored in a relational database system.
SQL uses a variety of commands and statements to manipulate data. Several of these commands are:
INSERT, DELETE, UPDATE, MERGE, SELECT, FROM, and WHERE
You can combine these commands into a inline statement to either query or manipulate data stored in tables within the database. For example to select the customer information from the customer table within a database one would simply write a statement:
SELECT firstname, lastname, address, state, zipcode, id
FROM Customers
ORDER BY lastname;
To insert a new customer into the table one would have a statement:
INSERT INTO Customers
(firstname, lastname, address, state, zipcode, id)
VALUES
('John', 'Dow', '1234 Anywhere St, 'TX', '77840', 1001);
More general information on SQL and how to program in SQL can be found here: https://en.wikipedia.org/wiki/SQL http://www.sql.org/ http://www.w3schools.com/SQl/default.asp
Now, typically there is a SQL server such as Microsoft SQL server or MySQL (https://www.mysql.com/). These are very useful in storing massive databases with many simultaneous users. So let us now address the question what is SQLite?
SQLite is as "SQLite is an in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine." (https://www.sqlite.org/about.html). This set of libraries enables you as a developer to utilize the SQL language to manipulate and query a simple database on a device, even a small embedded system. SQLite is in the public domain and can be used for free in any product without the need to purchase a license.
First go to the SQLlite web site, https://www.sqlite.org/about.html, and read about SQLlite and become familiar with it. The quick start guide, https://www.sqlite.org/quickstart.html, will provide a step-by-step process you can follow for installing and using SQLite. To install SQLite simply go to https://www.sqlite.org/download.html and download the appropriate version for you application or device. For a Windows OS you would select the "Precompiled Binaries for Windows" and download both the DLL and the command line tools.
For a Windows OS I simply copied the files in the ZIP file into folder names "SQLite" and opened a command window to test the command line tools.

Once you have the command line open you can perform some simple SQL commands. The example provide in the SQLite web site directs you to do the following commands to test the application.
First we simply execute the application and create a test database file:
sqlite3 test.db
Then once the application had loaded type the following commands and SQLite will create a simple table and then insert records into the table.
create table tbl1(one varchar(10), two smallint);
insert into tbl1 values('hello!',10);
insert into tbl1 values('goodbye', 20);
You then can view the records in the table by performing the command:
select * from tbl1;
At this point I would try creating various tables and trying various SQL data manipulation and query commands. This is a simple and direct interface.
For more information please see https://www.sqlite.org/
