Added SQL communication stuff

Since we don't have a sql server yet, all this SQL code is untested