added sql definitions
added thrift definitions (copied from java thrift)
readme update