refactor - modify arpa store and query - add sql script.