Explanation of Stored Procedures and Cursors in Databases