When I'm developing an application I need a database to store all user data, and to retrieve information fast. It doesn't matter if it's a web application or a desktop one, a database is always needed. So I built a layer that manages the access to the information. The closest layer to the database tables is the stored procedures layer. I use SQL Server as a database server, so the client side is base in SQLClient for .NET. Later on I'll explain how these stored procedures will work and how they are used from the client side.
There's an important thing to explain about these stored procedures, they are software generated with a CASE tool that I've developed. From an XML file I create the storeds, this XML file is also created from the table definition, I only add extra business logic but I don't start from 0, the tool generates a basic scaffolding that helps me a lot.
From a table I create the next storeds:
GET: to retrieve one (based on the primary key) or more rows (based in some criteria).