mysql: stored procedure,functions. what you use for?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

mysql: stored procedure,functions. what you use for?

Post by jmut »

Hi all,
I am aware mysql 5 stable is out for quite some time...and there are functions, stored procedures, views etc.
I am interested to hear when/where you find them useful... I think when there is one application working with the database...it is kind of not very usefull to have views for example. Maybe handy when multiple apps use the db and hence they use some common structure, not having to do complex selects etc.
Another thing stored procedures, functions are not very transaction aware if not mistaken..I think might be good to build a function when there is some action that involves multiple tables..e.g creating customer or whatever... to write in two tables..instead of having logic in php...but still I am not convinced this gives you good flexibility.

Can you share what you use those for..performance issues perhaps...or is it really preference with what you're best at.. writing db functions,procedures or stick to php side.
Post Reply