Intelligent restful database