To begin with, I first have to make it clear that every alternative except for the final one constitute potentially dangerous gaps in security. It is at this point that I would like to interrupt and demonstrate various alternatives – beginning with the most simple but also the least intelligent methods – and end with a best practice for how SQL strings should be transmitted. However, the use of Python doesn’t really make sense until SQLs are generated dynamically and data-driven. It is regarding this issue that there seem to be the most severe deviations from the required standardisation.īut this should not scare anyone off from using Python scripts as a flexible method for automating database operations.Īll connectors include an execute function which assumes an SQL statement as a string parameter and which can be executed on the part of the database. Results are received in more or less the same format everywhere. Thanks to a compulsory interface for database connectors, the "Python Database API Specification v2.0, PEP249", all current connectors have been developed so that database connections and the SQLs for data retrieval and data transactions can be started using the same commands.
0 Comments
Leave a Reply. |