官术网_书友最值得收藏!

  • MySQL for Python
  • Albert Lukaszewski, PhD
  • 125字
  • 2021-04-13 17:12:29

Room to grow

While the projection specification that we set for ourselves is fulfilled, there is more that can be done on this program to make it more serviceable in a production environment. Some areas that you might look at for further practice are:

  • Set the host, database, username, and password from command-line options. You will naturally need to error-check each of them. You will probably want to use the getpass module to accept the password in production environments.
  • Set an option for the column variable and testing whether that column exists in the chosen database.
  • Set up error-checking for the results itself.

The world database has a few other tables besides City. Can you aggregate their records in Python without using a JOIN statement?

主站蜘蛛池模板: 蓬溪县| 平塘县| 柘荣县| 循化| 梓潼县| 盐亭县| 南阳市| 页游| 桓仁| 蓬莱市| 陇川县| 弋阳县| 永靖县| 肇源县| 泾源县| 定南县| 凤冈县| 会泽县| 化隆| 瑞安市| 南乐县| 榕江县| 澳门| 漠河县| 龙州县| 兴隆县| 清原| 长汀县| 清水河县| 高阳县| 确山县| 华容县| 彰化县| 长子县| 商河县| 永新县| 梧州市| 崇信县| 拉萨市| 江源县| 万荣县|