This document discusses SQL injection attacks and proposes a method for detecting and preventing them. It begins with an introduction to SQL injection attacks and discusses how they work. It then reviews related literature on detecting and preventing SQL injection. The proposed system would use Aho-Corasick string matching to build a state machine model of valid SQL queries during static analysis. Runtime monitoring would then check dynamically generated queries against this static model to detect malicious queries before database execution.