Results 1 to 3 of 3
-
18th Apr 2012, 11:13 AM #1OPMemberWebsite's:
SherwoodForum.netPython Development with Databases?
Hey all, so I like to start all my technical questions by letting people know I'm a crap-flinging monkey when it comes to programming/scripting.
I do have a book on python I'm working on/going to be working on to help me get solid with all this (followed by a book on C, perhaps, which I already have but have decided python would be better for me to start with mostly because at the moment I'm doing a lot of learning-by-doing and that doing is kinda pushed by my wanting to make scripts to do stuff I couldn't possible start working on with C at this moment.
That said, one of the things I've begun to start wanting to work databases a little and I've had no experience with them outside of some time back when I was doing things with vBulletin software.
The ORM vs. DRM discussion confuses me pretty quickly, but from what I know at this point, seems like long term I'm going to want to be using SQL databases, and of all the ones out there I (at the moment, anyways) am leaning towards PostgreSQL (mostly because of its roots, functionally I'm just not smart enough to be able to judge differences and don't see a reason to believe it'll matter much).
I suppose now I get to my actual question which is: what is involved in posting some basic information to a PostegreSQL database with Python?
There seems to be a lot of "Drivers" or "Wrappers" for the "Python DB API 2.0". Does this mean I can't just use python functionality to post to the database? Are there any good tutorials/examples of all this?
How involvement is the creation of the databases?
At the moment I suppose I'd be wanting to have a fair number of fields-per-entry; but it seems like there is a lot of SQL programming/language/whatever involved that I might not be understanding?
Thank for any help you can give!Maverick Reviewed by Maverick on . Python Development with Databases? Hey all, so I like to start all my technical questions by letting people know I'm a crap-flinging monkey when it comes to programming/scripting. I do have a book on python I'm working on/going to be working on to help me get solid with all this (followed by a book on C, perhaps, which I already have but have decided python would be better for me to start with mostly because at the moment I'm doing a lot of learning-by-doing and that doing is kinda pushed by my wanting to make scripts to do Rating: 5
-
18th Apr 2012, 04:29 PM #2Respected Developer
What's your question exactly? From your post I'm not quite sure if your looking for help with *SQL, Python or interacting with *SQL from Python. Little bit more specific, please
.
-
19th Apr 2012, 06:06 AM #3You can call me G
Here's how to proceed. The Python DB API (PEP 249) provides a skeleton for all the db drivers to bind with the language. Its like unifying the syntax for common operations (the Python part of it). So you connect to the database, execute SQL, fetch data and stuff with pretty much the same python statement (the SQL syntax varies depending upon the 'flavour' used).
So, besides Python, you should be aware of some SQL to make it work. Ultimately its your queries that turn out to be the logic. The wrappers are only providing the outline to make connections and stuff easier.
However, if you find the SQL task a bit daunting, ORMs are there to encapsulate stuff. But, its always better to know some SQL before taking the plunge to an ORM (one gets lazy after the switch)
Hope that explains it all.
Regards,
Gaurav
My Langotiya Yaars (Chaddi buddies): JmZ, humour, Chutad, Esotorisk, l0calhost, Daniel, Mind Freak?, TLK, Amz
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
[For Hire] Web Development | PHP | Python
By Gaurav in forum ServicesReplies: 2Last Post: 8th Oct 2012, 11:54 AM -
[For Hire] Web App Development | Python
By ajinkya9 in forum ServicesReplies: 10Last Post: 8th Oct 2012, 05:29 AM -
Basically, Can You Help Me Understand Python For Web Development (Conceptually)?
By Maverick in forum Web Development AreaReplies: 6Last Post: 22nd Mar 2012, 03:24 AM -
[Buying] databases
By deelow66 in forum Completed TransactionsReplies: 8Last Post: 28th Oct 2011, 09:12 PM -
[For Hire] Python Development | xChat Plugin Development
By Gaurav in forum Completed TransactionsReplies: 5Last Post: 5th Oct 2011, 08:12 AM
themaRegister - register to forums...
Version 3.54 released. Open older version (or...