How to Install SQLite and the Sample Database

This is the first in a series of lessons devoted to teaching you SQL.  We are going to install SQLite and then move on to the fundamentals , which means learning the command line.  Do worry it is not as hard as it seem, and really, the payoff is huge. For once you learn SQL commands databases become less frustrating and it is really easy to get the data and reports you want.

Many of the examples used throughout this site are done using SQLite and the EssentialSQL sample database.  This is a very simple database as well suited for learning SQL.  There is very little to manage, and as such, we can focus our efforts towards learning SQL rather than the minutiae of configuring a large DBMS.

Installing SQLite

This video provides step by step instructions on installing SQLite.  Just follow along to get started.

[youtube https://www.youtube.com/watch?v=eiog7Kf33MI]

The files to get are on the SQLite Downloads page.

Downloading the Sample Database

To help with the examples I’ve put together a small sample database.  Watch this video to learn how to obtain this database and use it.

[youtube https://www.youtube.com/watch?v=umemOL-3Pbg]

Click here to down the sample database.

The sample database represents a very simple order entry system with customers, shippers, employees, orders, and order details.

Final Tricks

We’ll be working quite a bit in the windows command prompt to enter SQL commands.  I wouldn’t call it the friendliest place to work; however, it’s more hospitable once you use the following tricks:

  • Display Width:  Make the command window bigger.  To do so, run SQLite using the RunDB batch file.  Once the command window appears, click on icon in the upper left of the window and select properties.  Change the windows size width to 132 and its height to 80, then click OK to save.
  • Pasting Examples:  I usually write my SQL statement in notepad and paste them into the command windows.  This makes is so much easier to edit and make changes.

Got a question?  Do be afraid to ask; post a comment or tweet me.  I’m here to help you.

Kris Wenzel

Kris Wenzel has been working with databases over the past 28 years as a developer, analyst, and DBA. He has a BSE in Computer Engineering from the University of Michigan and a MBA from the University of Notre Dame. Kris has written hundreds of blog articles and many online courses. He loves helping others learn SQL.

  • Peter says:

    “suing” should be “using”. I hope!

  • Kris Wenzel says:

    Thanks for pointing that out. Definitely no suing here, no legal issues here, just good old fashioned SQL fun.

  • Hermin says:

    Hello Kris, I sent you a tweet. I’m unable to download your sample database from http://www.essentialsql.com/downloads/essentialsql.zip

    Is this no longer available? Thanks.

  • >