Programming with SQLite


Mark Mahoney

This is a short introduction to writing programs that use SQLite. SQLite is one of my favorite programming tools. It is a full-featured relational database management system that runs 'in-process' in your favorite programming languages. This means that you do not have to have a separate database server running that your programs connect to. I am assuming the reader knows about RDBMSs and SQL. This covers using SQLite in different programming languages.

I start by showing the C/C++ API. I go over some of the low level functions and then I build an abstraction layer on top of them. Finally, I explain transactions in SQLite. Next, I discuss SQLite in the context of Python. I show how to create tables and write queries from a standalone Python program. Next, I show how one can use SQLite in a flask web app and how to create a web-based API. Lastly, I show how one can use SQLite from a Java program.

If you'd like to stay connected and get updates when I add new playbacks you can follow me on twitter: @markm208.

1.1 The C++ SQLite API
1.2 An Object Oriented Auction Program
1.3 SQLite Transactions

2.1 Querying a SQLite Database
2.2 Creating SQLite Databases
2.3 Flask Basics (Windows)
2.4 Creating an API with Flask and SQLite

3.1 Using a SQLite Database in a Java Program