From 6d91f4de4d7ae5ff3120d682275f4c4703085a4e Mon Sep 17 00:00:00 2001 From: Meenakshi Agarwal Date: Sat, 17 Feb 2024 14:20:52 +0530 Subject: [PATCH 1/3] Update README.md Add brief description for each of the scripts --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index ff31762..c0a03d7 100644 --- a/README.md +++ b/README.md @@ -1 +1,14 @@ # python-sql-examples + +The Database Utility Python Script: db_utils.py +MySQL Create Database Python: mysql_create_db.py +MySQL Create Table Python Script: mysql_create_table.py +MySQL Insert Rows Python Script: mysql_insert_rows.py +MySQL Select Rows Python Script: mysql_select_rows.py +MySQL Update Rows Python Script: mysql_update_rows.py +MySQL Join Operations Demo Python Script: mysql_join_ops.py +MySQL Aggregate Functions Demo Python Script: mysql_aggr_ops.py +MySQL Drop Table Python Script: mysql_drop_table.py +MySQL Drop Database Python Script: mysql_drop_db.py +MySQL Python Scripts Launcher Script: db_run_scripts.py +MySQL Combined Python Script: db_uni_demo.py From 1eb9a99f33db188a41866dc11ea108854dd34961 Mon Sep 17 00:00:00 2001 From: Meenakshi Agarwal Date: Sat, 17 Feb 2024 14:23:49 +0530 Subject: [PATCH 2/3] Update README.md Updated the content as per the required format with more detail. --- README.md | 57 +++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index c0a03d7..54e8eca 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,43 @@ -# python-sql-examples - -The Database Utility Python Script: db_utils.py -MySQL Create Database Python: mysql_create_db.py -MySQL Create Table Python Script: mysql_create_table.py -MySQL Insert Rows Python Script: mysql_insert_rows.py -MySQL Select Rows Python Script: mysql_select_rows.py -MySQL Update Rows Python Script: mysql_update_rows.py -MySQL Join Operations Demo Python Script: mysql_join_ops.py -MySQL Aggregate Functions Demo Python Script: mysql_aggr_ops.py -MySQL Drop Table Python Script: mysql_drop_table.py -MySQL Drop Database Python Script: mysql_drop_db.py -MySQL Python Scripts Launcher Script: db_run_scripts.py -MySQL Combined Python Script: db_uni_demo.py +# 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`](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`](mysql_create_db.py) +Demonstrates how to create a new MySQL database using Python. + +### MySQL Create Table Python: [`mysql_create_table.py`](mysql_create_table.py) +Illustrates the creation of tables within a MySQL database using Python. + +### MySQL Insert Rows Python: [`mysql_insert_rows.py`](mysql_insert_rows.py) +Shows how to insert data into MySQL tables using Python. + +### MySQL Select Rows Python: [`mysql_select_rows.py`](mysql_select_rows.py) +Retrieves and prints records from a MySQL table using Python. + +### MySQL Update Rows Python: [`mysql_update_rows.py`](mysql_update_rows.py) +Demonstrates updating records in a MySQL table using Python. + +### MySQL Join Operations Demo Python: [`mysql_join_ops.py`](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`](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`](mysql_drop_table.py) +Shows how to delete a MySQL table using Python. + +### MySQL Drop Database Python: [`mysql_drop_db.py`](mysql_drop_db.py) +Illustrates the deletion of a MySQL database using Python. + +### MySQL Python Scripts Launcher Script: [`db_run_scripts.py`](db_run_scripts.py) +A launcher script to run all the individual MySQL scripts conveniently. + +### MySQL Combined Python Script: [`db_uni_demo.py`](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. From f0806c252ef416f2d6ee8c767f3ef7fc0e77495b Mon Sep 17 00:00:00 2001 From: Meenakshi Agarwal Date: Sat, 17 Feb 2024 14:41:13 +0530 Subject: [PATCH 3/3] Update README.md Fixed the links to all the Python MySQL scripts. --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 54e8eca..01ff500 100644 --- a/README.md +++ b/README.md @@ -4,40 +4,40 @@ This repository contains a set of Python scripts for interacting with MySQL data ## Scripts Overview -### Database Utility Script: [`db_utils.py`](db_utils.py) +### Database Utility Script: [`db_utils.py`](https://github.com/techbeamers/python-sql-examples/blob/main/python-mysql-examples/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`](mysql_create_db.py) +### MySQL Create Database Python: [`mysql_create_db.py`](https://github.com/techbeamers/python-sql-examples/blob/main/python-mysql-examples/mysql_create_db.py) Demonstrates how to create a new MySQL database using Python. -### MySQL Create Table Python: [`mysql_create_table.py`](mysql_create_table.py) +### MySQL Create Table Python: [`mysql_create_table.py`](https://github.com/techbeamers/python-sql-examples/blob/main/python-mysql-examples/mysql_create_table.py) Illustrates the creation of tables within a MySQL database using Python. -### MySQL Insert Rows Python: [`mysql_insert_rows.py`](mysql_insert_rows.py) +### MySQL Insert Rows Python: [`mysql_insert_rows.py`](https://github.com/techbeamers/python-sql-examples/blob/main/python-mysql-examples/mysql_insert_rows.py) Shows how to insert data into MySQL tables using Python. -### MySQL Select Rows Python: [`mysql_select_rows.py`](mysql_select_rows.py) +### MySQL Select Rows Python: [`mysql_select_rows.py`](https://github.com/techbeamers/python-sql-examples/blob/main/python-mysql-examples/mysql_select_rows.py) Retrieves and prints records from a MySQL table using Python. -### MySQL Update Rows Python: [`mysql_update_rows.py`](mysql_update_rows.py) +### MySQL Update Rows Python: [`mysql_update_rows.py`](https://github.com/techbeamers/python-sql-examples/blob/main/python-mysql-examples/mysql_update_rows.py) Demonstrates updating records in a MySQL table using Python. -### MySQL Join Operations Demo Python: [`mysql_join_ops.py`](mysql_join_ops.py) +### MySQL Join Operations Demo Python: [`mysql_join_ops.py`](https://github.com/techbeamers/python-sql-examples/blob/main/python-mysql-examples/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`](mysql_aggr_ops.py) +### MySQL Aggregate Functions Demo Python: [`mysql_aggr_ops.py`](https://github.com/techbeamers/python-sql-examples/blob/main/python-mysql-examples/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`](mysql_drop_table.py) +### MySQL Drop Table Python: [`mysql_drop_table.py`](https://github.com/techbeamers/python-sql-examples/blob/main/python-mysql-examples/mysql_drop_table.py) Shows how to delete a MySQL table using Python. -### MySQL Drop Database Python: [`mysql_drop_db.py`](mysql_drop_db.py) +### MySQL Drop Database Python: [`mysql_drop_db.py`](https://github.com/techbeamers/python-sql-examples/blob/main/python-mysql-examples/mysql_drop_db.py) Illustrates the deletion of a MySQL database using Python. -### MySQL Python Scripts Launcher Script: [`db_run_scripts.py`](db_run_scripts.py) +### MySQL Python Scripts Launcher Script: [`db_run_scripts.py`](https://github.com/techbeamers/python-sql-examples/blob/main/python-mysql-examples/db_run_scripts.py) A launcher script to run all the individual MySQL scripts conveniently. -### MySQL Combined Python Script: [`db_uni_demo.py`](db_uni_demo.py) +### MySQL Combined Python Script: [`db_uni_demo.py`](https://github.com/techbeamers/python-sql-examples/blob/main/python-mysql-examples/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.