Welcome to SQLite3 with Python
Course! This course is designed for beginners who want to learn practical database management using SQLite with Python. It's perfect for aspiring data scientists, software developers, or anyone looking to build small to medium-sized applications that require efficient data storage and manipulation without the complexity of a server-based database system.
The theoretical part of databases (e.g., relational databases, SQL fundamentals) has been covered in a prior MySQL course. Now, we aim to transition to SQLite3, emphasizing code execution and real-world usage scenarios.
By the end of this course you will learn:
- Understand how SQLite differs from other database systems like MySQL.
- Set up and manage an SQLite database using Python’s sqlite3 module in Jupyter notebooks.
- Perform common database operations such as creating tables, inserting, updating, and deleting records.
- Write advanced SQL queries with JOIN, GROUP BY, HAVING, and aggregate functions.
-
Practical Execution: Every database operation is demonstrated through code in a Jupyter Notebook, allowing students to interactively execute queries, manipulate data, and see immediate results.
-
Step-by-Step Code Examples: Each lesson contains code snippets that demonstrate SQLite3 operations, making it easy for students to follow along and practice independently.
-
Hands-On Project: By the end of the course, students will apply their knowledge in a minor project (e.g., a School Management Database) to solidify their learning.
SQLite | MySQL |
---|---|
Serverless and lightweight, stores data in a single file. | Requires a separate server to run and manage databases. |
Best for small to medium-sized applications with fewer users. | Designed for large-scale applications with many concurrent users. |
No need for complex configuration or installation. | Requires configuration and maintenance of a database server. |
Limited support for advanced features like user management and replication. | Provides extensive support for features like user permissions, replication, and clustering. |
- What is Database and it's types?
- What is SQLite?
- Comparison between SQLite and MySQL
- Key features and Use cases of SQLite
- Installation and configuration SQLite3 with setting Up SQLite3 locally.
- Database creation
- Establishing connections using SQLite3
SQL CREATE TABLE
statements- Inserting Data into Tables (using
execute()
,executemany()
) - How to reconnect with the database
- Using
DELETE
to remove records - Using
DELETE
to delete database - Writing
UPDATE
statements to update the database - Closing the connection
- Writing basic
SELECT
statements - Condition-based queries
WHERE
AND
OR
IN
BETWEEN
LIKE
- Ordering and Pagination
- Using
ORDER BY
for sorting - Implementing pagination with
LIMIT
andOffset
clause
- Using
- Understanding different types of joins
- Combining data from multiple tables using Joins
- Grouping and Aggregating Data
- Utilizing
GROUP BY
andHAVING
- Utilizing
- Applying aggregate functions
COUNT()
SUM()
AVG()
MIN()
MAX()
At the end of the course, students will build a School Management System with a database consisting of tables for students, courses, enrollments, and grades. This project will involve creating tables, inserting data, writing queries, and performing transactions.
- Python 3.x (Latest version)
- Jupyter Notebook (else other Python IDE)
- SQLite3 (usually included with Python)
- This course assumes basic programming knowledge (variables, loops, functions) and a basic understanding of SQL, covered in previous MySQL lessons.
- All examples are designed for practical, hands-on learning. Students are encouraged to practice in real-time by executing each query in Jupyter.
By completing this course, you will gain valuable skills in using SQLite3 with Python, which are essential tools in modern data management and application development. You'll be equipped to handle your own database projects efficiently and collaborate with others in the programming community.
Let's embark on this exciting journey into the world of database management and practical SQL together!