SQL code for the backend

Adding this for review. Pretty straight forward -- Foreign Keys are
commented out, wasn't 100% sure we wanted them, but left them in just in
case.