sql procedures implemented in front end