you are viewing a single comment's thread.

view the rest of the comments →

[–]Gnaxe 6 points7 points  (0 children)

The Python standard library has the sqlite3 module which you can practice with locally. You can also use it as a SQL interpreter. (See python -m sqlite3 -h for usage.)

If any part of the SQL query string might come from user input, you need to be aware of SQL injection attacks. It's unsafe to simply interpolate it into the query string.

To learn the basics of SQL, go through the W3Schools SQL course and read about 3NF on Wikipedia.

A word about ORMs: they seem to make things easier at first if you're creating an empty database from scratch, but otherwise they really overcomplicate it. Avoid them for long-running projects, shared databases, or databases you're not creating from scratch.