Started mysql table design

Created temporary php file to create the mysql tables. Still lots of
missing tables and fields...