storage: improve the storage interface. implement sql fetch