Python Data Visualization, SQL Connectivity & EDA
Back to CONNECTING PYTHON TO RELATIONAL DATABASES & SQL

LAB 1: Python & SQLite Database Connectivity Lab

Practice secure SQLite operations, bound parameterized queries, transaction rollback, and chunked Pandas streaming.

40 minutesProject submission
๐ŸŽฏ Free Guest Mode: You are learning for free. Sign in to save your completion progress and quiz answers.

Assignment Instructions

Module 1 Hands-On Lab: Python & SQLite Database Connectivity

Put your SQL connectivity skills into practice. In this lab, you will work directly with SQLite and SQLAlchemy inside a Jupyter notebook to execute secure CRUD operations, prove atomic transaction rollback, and safely stream large result sets in Pandas.

Download Starter Notebook: 01_python_sqlite_connectivity_starter.ipynb


Scenario & Business Context

You are tasked with building the secure database ingestion layer for an analytics platform. You must ensure that arbitrary user inputs are safely escaped, partial transactions are aborted if an error occurs, and table reads do not exhaust system memory.

What You Will Build & Demonstrate

TaskDeliverablePoints
T05 ยท Secure SQLite CRUD and cursor retrievallab_conn, find_note(), bound parameterized queries, cursor fetch methods5
T06 ยท Prove transaction rollbackrollback_before, rollback_after, atomic transaction abort in context manager4
T07 ยท SQLAlchemy and pandas round tripengine, warehouse_sales, warehouse_customers, index-free DataFrame writes5
T08 ยท Process SQL in chunks & memory safetystream_rows, stream_revenue, chunksize=200 generator iteration4

Total Points Available: 18 points (Pass: 80% / 15 pts)

Submission Guidelines

  1. Download the starter notebook .ipynb.
  2. Open in VS Code, JupyterLab, or Google Colab.
  3. Complete the # TODO cells and pass all public assertions.
  4. Restart your kernel and run all cells cleanly.
  5. Upload your executed .ipynb file below.
Checking your accessโ€ฆ