Just a collection of useful links, at least to me
WordPress database basics and schema, WordPress Codex
Documentation on $wpdb, WordPress Codex
“Data validation,” WordPress Codex
“SQL Injection,” Wikipedia
“SQL Injection Attacks by Example,” Steve Friedl
ezSQL class documentation, Justin Vincent