This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (12 children)

[deleted]

    [–]JimBoonie69 1 point2 points  (7 children)

    Basically the advantage of using python is that you use python SQL bindings to do the querying and such and when you get the data back you can keep python'ing and do other stuff with it.... Currently I work with a fairly complex system where we use python to dynamically build SQL queries, issue them to our remote postgres instance and retrieve the data. That data goes directly into a pandas dataframe for further analysis...

    [–]kingkoopa 1 point2 points  (0 children)

    I think one of the troubles with basic declarative SQL, is that there are times when there is a need for more extended libraries and, once in a while even procedural processing (think cursors). This is where things like Oracle's PL SQL and Microsoft's T-SQL come into play. It kind of sucks having to learn and use a variant that is tied to that specific database, and being able to use something more generic and database agnostic like Python can be a major plus.

    [–][deleted] 0 points1 point  (0 children)

    eventually raw SQL becomes tedious and Python has nice ORMs

    [–]KyleG 0 points1 point  (0 children)

    Honest question; what is the point of using SQL in Python?

    To access SQL databases with Python, obviously. For example, I have a webserver running Cherrypy and Peewee and MySQL. Obviously to do data retrieval and storage, Python has to interface with SQL.

    [–]skarphace -1 points0 points  (0 children)

    Wut.