I intend to use very simple raw SQL in a Django project. example:
SELECT name,doc_id,doc_content,creation_date from doc_table where uid = 'xxx' limit 1 ;
Primary requirements:
Ease of doing SQL queries and getting data - eg. If I use MySQLdb , I do not want to repetitively do queries through cursor, then process the tuples to get a dictionary of required data.
Protection against SQL injection , and proper escaping of data.
There are two choices,
a) Using SQLAlchemy , even if used only for raw SQL.
b) Use a wrapper written over MySQLdb, or write one.
I am inclined towards SQLAlchemy as I have read a lot of good things about it.
Will there be any significant performance overhead of using SQLAlchemy eg CPU usage,Memory usage as compared to a simpler MySQLdb wrapper , if I intend to use it only for simple raw SQL. All other batteries of SQLAlchemy are not of much use.