Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Database Functions

 
Drew Lane
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it generally best practice to avoid database functions to keep your code portable or does the perfomance advantage outweigh this?

Are there certain database functions that are guaranteed to work across databases?

Regards,

Drew
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on your app.
If you're writing a shrink-wrapped type of app, it would be beneficial to have it work with multiple RDBMSs.

For large enterprise apps, most are written and designed as Oracle/Java or DB2/Java, etc.. type apps. The benefits of stored procedures will far outweigh db independence in most cases.

For your last question: I would never count on a function or stored procedure working the same way across multiple database systems.
[ February 23, 2005: Message edited by: Ben Souther ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic