--- Aahz firstname.lastname@example.org wrote:
Aside from the standard featuritis objection, my objection stems almost entirely from the difficulty of defining appropriate data structures on which to operate. SQL works partly because data in SQL tables is already *by definition* in a relational format -- which won't be true in Python, causing all kinds of runtime errors that IMO are inappropriate for SQL.
In theory, I obviously agree, as a list can be full of all kinds of heterogeneous structures, and the fact that it can be is one of the beauties of Python, and certainly trying to apply native, byte-code interpreted SQL to such structures would certainly lead to run-time errors that even unit tests couldn't even catch in theory, much less practice.
But, in my own day-to-day practice (I've recently been working on a billing system, which is not rocket science, just tedious), I find myself constantly calling into my DB API, which returns me a list of dictionaries, and the transformation from database to network to API to Python doesn't diminish the relational perfectness of the data whatsoever.
Then I find myself transforming the SQL result set in many ways in Python. Some of those transformations are non-relational, which is the whole reason to bring the data into Python in the first place. But other transforms are relational, and that's where I want SQL.
Which raises the natural question--to the extent that I want to do more relational transforms on the data that I already have, why don't I just farm that back out to my relational database? The two-part answer is that 1) of course I can, but 2) I don't want to, because I already have the data in Python.
Answer #3 is Peoplesoft. If you've never worked with a really awkward database structure in the real world, please count yourself lucky, and I'll buy you drinks at your 30th birthday party.
Do you understand at least my motivation, if not necessarily agreeing with the wisdom of my overall proposal?
____________________________________________________________________________________Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/