sql commands

still need slight improvement. no extraction of data yet