SQL injections are a category of web application security vulnerabilities that can affect both relational databases and NoSQL data stores.
How security flaws work: SQL injection is an approachable primer on the history and danger of how unsanitized inputs to a database work.
Preventing SQL injections provides a PostgreSQL and psycopg2 example for how to avoid getting bit by a SQL injection vulnerability.
Securing your site like it's 1999 covers a bunch of common web application vulnerabilities including SQL injection.
Automating Blind Sql Injection shows how to use Python to execute SQL injection on the example Damn Vulnerable Web Application project.