Initial Submital

Here is what I was able to make work using a local instance of MySQL. I'm still working on the stored functions for the remaining queries. but this is now down to busy work.