Getting Started with Python and MySQL – Updated for 2014

Python and MySQL

I’m a programming language nut. Since my days at CMU I have been fascinated by programming languages and finding the best language for each specific application. At Fashion Metric I write code in PHP and Python and use languages that I don’t consider coding (since they’re really just markup languages) like HTML and CSS.

I was recently training one of the programmers who is working with us on Python and MySQL and thought that I would share with all of you some of the tutorial that I shared with him.

In case you missed the memo, Python is cool again, which is good for guys like me who got into it back in the good old days and then saw languages like PHP steal the limelight. Well now Python is back in a major way, it’s popular again, and thanks to frameworks like Flask it is super-powerful and easy to use for any web-based programming wizardry you throw at it.

So one of the things you’re probably going to want to do with Python is connect to a MySQL database, below are six of my favorite tutorials for getting you started and dangerous enough to get going right-away:

Python + MySQL
1) http://stackoverflow.com/questions/372885/how-do-i-connect-to-a-mysql-database-in-python

2) http://dev.mysql.com/doc/connector-python/en/

SQL Reference
1) http://www.w3schools.com/sql/sql_quickref.asp

2) http://www.sqlcommands.net/

Relational Databases
1) http://stackoverflow.com/questions/4702728/relational-table-naming-convention

2) http://holowczak.com/database-normalization/

Photo Credit: Sebastian Niedlich (Grabthar) via Compfight cc

{ 5 comments… add one }

  • Mike June 30, 2014, 4:02 pm

    Perl is better than Python. Think about it.

    Reply
  • Morgan June 30, 2014, 4:17 pm

    @Mike – I think you’ll have a hard time finding people who even remember what Perl is…

    Reply
  • Anthony July 1, 2014, 4:07 am

    Is there a difference between Perl and Python such that one would be better used in a certain situation than the other?

    Reply
    • Morgan July 14, 2014, 7:15 am

      @Anthony – yes there is and good question. Perl was very popular in the late 90’s as CGI was a popular way to send data across web pages, this is where Perl really peaked. Since then while there is still plenty of great things you can do with Perl there have been far more libraries and APIs crated for Python. At the end of the day given all the dev focus going into Python it has definitely come out ahead.

      Reply
  • Anthony July 14, 2014, 7:43 am

    Thanks Morgan. I’ve been a Microsoft-stack developer since the early 80s but I really need to start expanding myself out to other technologies.

    Reply

Leave a Comment