Added state management class of sql