Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this problem, you will need to write a program that will connect to a local MySQL database and use the MySQL Connector for python

For this problem, you will need to write a program that will connect to a local MySQL database and use the MySQL Connector for python programming.

Write a python program that will prompt the user for a database schema name and report the number of tables, a list of table and the number of each record in each table. Design suggestions: Use two result sets One to hold the results of a "SHOW TABLES" command and one to hold a query of each table to determine the record count. Use a for loop to step through the first result set to display the first element of the tuple (the table name) and then query the table to find the number of records. Use the len() function on the result set to find the number of tuples.

please add comments to explain.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions

Question

Has time been designated in the schedule for collaboration?

Answered: 1 week ago