CSCI 3342 Web Development
Spring 2024

Database and SQL

SQLite, a Relational Database Management System (RDBMS)

"probably one of the top five most deployed software modules of any description"
Relational databases and Relational Database Management Systems (RDBMS) have been around since the 1970s. Storing persistent data in relational format has decades of well-understood theory behind it, and the major RDBMS are mature, stable, and reliable. Oracle, MySQL, PostgreSQL, and SQL Server can all handle terabytes of data with efficient inserts, updates, and retrieves.

Relational Data (8:50)

How to design your database structure.
For this class, we will be using SQLite as our RDBMS backend. SQLite is an RDBMS that stores data in a single file. There is no install, no setup, and no server to run. It is stable, mature, reliable, and the db file can easily be shared, copied, and backed up. This makes it ideal for early development. SQLite supports all the common features of SQL, and is sufficiently performant to be a good persistent data solution for many applications that do not have advanced multi-user and security concerns.
Download and install DB Browser for SQLite, a simple, free multi-platform tool to create, view, and edit SQLite files outside of code.
In this step, we'll walk through creating a persistent relational database for our Server-Side Shopping website from the last assignment. Grab the (empty) repo, then follow along with the video below to create your .sqlite file there in the working directory.
Note: To cut down on busywork, we won't create a separate user table, we'll just stick with author as a string. You're welcome.

Making a SQLite Database (8:50)

Schema, tables, and rows.

Assignment Checklist

Install DB Browser for SQLite
Create a new database for your project
Add the item and review tables
Add data to your new database: at least three items and one or two reviews per item