[Tutor] Formatting String for SQL Insert
hcohen2
hcohen2 at comcast.net
Wed Jan 21 15:11:48 EST 2004
Alan Gauld wrote:
>>>I do have a question, why other than say a web application would
>>>
>>>
>one
>
>
>>>resort to using python and/or perl to process database data when
>>>
>>>
>one
>
>
>>>could call stored procedures?
>>>
>>>
>>of your choice. Some DB's (such as MySQL) do not have stored
>>
>>
>procedures.
>
>Also if your server is maxed out of CPU stored procedures will be a
>big resource hog. If the procedure is doing a lot of processing on a
>relatively small amount of data (so the network doesn't die!) then
>it is more efficient to move the processing out of the server to
>the PC client.
>
>Client/Server computing design is full of these kinds of compromise
>choices. Working out which functions to build on the sever vv the
>client.
>IN an ideal world business logic which should be applied to all
>applications should go on the server. Beyond that things which act
>on a lot of data(and thus kill the network) should also be done on
>the server. Application logic which heavily processes a small
>amount of data should go on the client. Anything which straddles
>boundaries, or where hardware/network limitations are non ideal
>requires some designer intelligence.
>
>Alan g
>
>
>
>
Everyone:
In some ways this was one of my dumber questions (however, I am sure
there will be some disagreement about that!). I neglected to mention my
primary reason for studying python, i.e. validation of data files that
are to be input into a database.
I really do not like perl. Moreover, perl is used to process and
validate data from clients. Furthermore, many of those clients insist
on retaining there symbols that are sometimes difficult to interpret
even by the human eye (assuming there are brain cells behind the
former). It is then necessary to map to the proper column and data
types, which is not a trivial effort. Indeed when there are a fair
number of clients with a new stream of files and perhaps new people
within those organizations you find serious problems when new,
unexpected data representations arrive. Translation: 'batch loading of
data files crashes'.
Python is so much easier to read, hence, the maintenance load is easier
for those having to take care of such problems.
More information about the Tutor
mailing list