Python or C++ for database backend?

Discussion in 'Mac Programming' started by MorphingDragon, Aug 28, 2010.

  1. MorphingDragon macrumors 603


    Mar 27, 2009
    The World Inbetween
    I got asked to write a crossplatform app for work (and I refuse to use Mono) which needs to interact with out Postgere SQL database. I'm not really comfortable with C++ yet so how does Python perform under heavy loads?
  2. larkost macrumors 6502a

    Oct 13, 2007
    You are missing a lot of the details we would need to help you out:

    - By application do you mean something with a GUI, or a more server based process? Python is not very cross-platform when it comes to GUIs.

    - What do you mean by heavy loads, and how much optimization are you going to be putting into this?

    C++ is going to be the better choice if you are going to be doing a lot of really intense computation and are willing to spend the time wringing all of optimizations possible out of the problem, whereas Python is going to get you to a working version much faster but is going to carry some speed penalty unless you start to put compiled modules in (C/C++). If most of your heavy lifting is actually going to happen inside your SQL queries (a common thing with database apps), the your choice of language is not going to have much of an effect (unless you hit pathological cases).

    And your phrase "database backend" probably is not the one you want. That would usually refer to PostreSQL in this case.

Share This Page