Skip to content

techbeamers/python-sql-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Python SQL Examples

This repository contains a set of Python scripts for interacting with MySQL databases. Each script focuses on specific database operations, making it easy to understand and use.

Scripts Overview

Database Utility Script: db_utils.py

This script provides utility functions for connecting to MySQL databases, creating connections, and handling common database operations.

MySQL Create Database Python: mysql_create_db.py

Demonstrates how to create a new MySQL database using Python.

MySQL Create Table Python: mysql_create_table.py

Illustrates the creation of tables within a MySQL database using Python.

MySQL Insert Rows Python: mysql_insert_rows.py

Shows how to insert data into MySQL tables using Python.

MySQL Select Rows Python: mysql_select_rows.py

Retrieves and prints records from a MySQL table using Python.

MySQL Update Rows Python: mysql_update_rows.py

Demonstrates updating records in a MySQL table using Python.

MySQL Join Operations Demo Python: mysql_join_ops.py

Illustrates seamless data combinations from different tables using Python SQL join operations.

MySQL Aggregate Functions Demo Python: mysql_aggr_ops.py

Demonstrates the use of SQL aggregate functions such as SUM, AVG, and COUNT in Python for data analysis.

MySQL Drop Table Python: mysql_drop_table.py

Shows how to delete a MySQL table using Python.

MySQL Drop Database Python: mysql_drop_db.py

Illustrates the deletion of a MySQL database using Python.

MySQL Python Scripts Launcher Script: db_run_scripts.py

A launcher script to run all the individual MySQL scripts conveniently.

MySQL Combined Python Script: db_uni_demo.py

A combined script showcasing multiple SQL operations for a comprehensive example.

Feel free to explore each script for detailed explanations and usage instructions.

About

How to Connect Python to SQL Database with Examples

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published