Templates for stored procedures?

Are there any templates for writing stored procedures? as:

  • Should we write 1 Sp to update, 1 to insert and 1 to select for each table.
  • When it’s useful to create views.
  • How to manage business rules in SP?
  • How to reduce duplicate code, etc. etc.

Any good article or book to read about these templates ...

thanks

+5
source share
1 answer

Typically, stored procs follow the CRUD pattern ( http://en.wikipedia.org/wiki/Create,_read,_update_and_delete ), but they should not be limited to this.

1) , . , , . GUID , , , , . / .

get_by_id, get_by_non-unique, . , , get/list.

- , , , , . .

2) , . , .

3) -. , , . , , proc, , login.

4) , stord procs, .

, .

+6

All Articles