sql tables WIP
edited copy