-
Website
http://awads.net/wp/ -
Original page
http://awads.net/wp/2008/03/09/oracle-sql-and-plsql-bad-practices-document/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
jgarry
3 comments · 1 points
-
Andy C
22 comments · 47 points
-
dahowlett
1 comment · 2 points
-
Don Seiler
9 comments · 1 points
-
davidhaimes
4 comments · 3 points
-
-
Popular Threads
Witness the title, which apparently refers to only SQL and PL/SQL and then the following claims which have *nothing* to do with SQL or PL/SQL and are all about database and application *design*:
Storing ROWIDs for later reference,
Storing an empty LOB instead of NULL,
Use of magic numbers and strings instead of NULL.
Talk about confusing the confused...
But what I really prefer is views with Instead of triggers. You get all of the benefit of using an API, but you can use any tool that expects to be updating a table.
You've also got two objects to deal with. Not necessarily a bad thing if the view can be re-used. But you are likely to be faced with the choice of putting filter conditions within the view itself, or as part of the query against the view.
@John: yes, it makes sense to use a tool to generate packages for API access to table data. I believe Quest CodeGen Utility http://qcgu.net/ can do that for you.
@gary: I agree with you. One approach is to wrap all SQL, complex or not, into separate functions.