SQLite Tutorials

SQLite provides a well-structured learning path for embedded database management. Our tutorials cover SQL queries, database design, and optimization techniques, suitable for both beginners and intermediate developers. With free labs and practical examples, you'll gain hands-on experience in database operations. Our interactive database playground allows you to practice SQL queries and see instant results.

Add Ticket Search to a Worker

Add Ticket Search to a Worker

Build prepared CRUD queries for a D1-backed ticket API, filter records safely, and handle missing or invalid input.
CloudflareSQLite
Recover an Accidental Ticket Deletion

Recover an Accidental Ticket Deletion

Recover a deleted ticket with D1 Time Travel and verify the original database binding and application reads.
CloudflareSQLite
Restore WebSocket Connection Context

Restore WebSocket Connection Context

Build a hibernation-compatible room service that stores safe per-connection attachments and reconstructs client context without depending on forced production eviction.
CloudflareSQLite
Persist a Room Activity Log

Persist a Room Activity Log

Build a SQLite-backed room activity log, prove that records survive local restarts and cloud redeployment, and keep each room's history isolated.
CloudflareSQLite
Coordinate Concurrent Reservations

Coordinate Concurrent Reservations

Build a bounded workshop reservation service, send requests concurrently, and prove that durable atomic updates prevent overbooking across restarts and deployments.
CloudflareSQLite
Broadcast Room Updates

Broadcast Room Updates

Build a room-scoped Durable Object WebSocket service that validates messages, broadcasts updates to connected peers, and keeps separate rooms isolated.
CloudflareSQLite
Query and Index Ticket Activity

Query and Index Ticket Activity

Join tickets with activity, include zero-event counts, and justify a D1 index using the query plan.
CloudflareSQLite
Migrate a Ticket Schema

Migrate a Ticket Schema

Add ticket priority through ordered D1 migrations while preserving existing rows and checking local and remote rollout state.
CloudflareSQLite
Keep Related Ticket Updates Consistent

Keep Related Ticket Updates Consistent

Keep ticket closure and resolution notes atomic with D1 batches, then continue sequential reads using session bookmarks.
CloudflareSQLite
Export and Rebuild a Database

Export and Rebuild a Database

Export a D1 database to SQL, rebuild a separate database, and compare recovered rows and constraints with the unchanged original.
CloudflareSQLite
Create a Support Ticket Database

Create a Support Ticket Database

Create a D1 ticket table, enforce valid data with SQL constraints, and keep local practice separate from cloud records.
CloudflareSQLite
Schedule Reservation Expiry

Schedule Reservation Expiry

Build a reservation service whose persistent Durable Object alarms survive restarts, expire only the intended hold, and remain safe when expiry work is repeated.
CloudflareSQLite
SQLite View Creation

SQLite View Creation

In this lab, we will explore SQLite view creation, focusing on building complex views, querying through them, updating via updatable views, and removing obsolete views. Learn to simplify queries and control data access with SQLite views.
SQLite
SQLite Window Analytics

SQLite Window Analytics

In this lab, you will explore SQLite window analytics, focusing on ranking rows and computing running totals. You'll learn how to use window functions to perform calculations across sets of rows that are related to the current row.
SQLite
Install and Verify SQLite on Linux

Install and Verify SQLite on Linux

In this challenge, you will install SQLite and verify its successful installation and accessibility within a Linux environment. The challenge involves installing SQLite using package management tools, executing the `sqlite3 --version` command in the terminal, and confirming that the output displays a valid SQLite version number.
SQLiteLinux
Insert User Data into SQLite

Insert User Data into SQLite

In this challenge, you'll be working with SQLite to insert user data into a database table. The goal is to populate a `users` table with three specific records, each containing an `id`, `name`, and `age`. You'll need to connect to the `users.db` database and use the `INSERT INTO` command.
SQLite
Query Specific Data in SQLite

Query Specific Data in SQLite

In this challenge, you'll leverage your SQL skills to query specific data within an SQLite database named `treasure.db`. The goal is to retrieve a hidden artifact by crafting a `SELECT` statement that filters results based on the artifact's `id`. You'll connect to the database, write a query to select the `name` column from the `artifacts` table, and use a `WHERE` clause to identify the artifact with an `id` of 2.
SQLite
SQLite Trigger Automation

SQLite Trigger Automation

In this lab, you will explore SQLite trigger automation, focusing on creating, validating, and managing triggers. You'll learn how to automatically execute SQL statements in response to update events on a specific table. Create audit logs and manage triggers effectively.
SQLite
  • Prev
  • 1
  • 2
  • 3
  • Next