I'm working as a junior programmer, and the senior programmer above me has instructed me to follow a certain unofficial policy for constructing new queries on our web development projects. Generally, we are developing an intranet site for some client, and they always have databases. He wants me to have a class containing a method for each query that the website will perform. This class calls web methods in a web service, hosted on the same machine. Those web methods use ADO to run stored procedures that perform simple queries. Sometimes the queries need parameters and sometimes they don't. When I say simple queries, I mean simple...select * from table where column=@parameter
I feel like there are several extra steps here, and I'm hoping someone can explain why he might want this as our standard procedure for using databases in web apps. He says each step adds a layer of security. I'm genuinely interested in how all this provides security. Is all this necessary? Why or why not?