-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Use stored procedures in a new project?
PostPosted: Mon Sep 20, 2010 7:20 am 
Regular
Regular

Joined: Thu Oct 19, 2006 12:07 pm
Posts: 75
Hi!

Does it make sense to use stored procedures in a new project, that uses hibernate, Spring and PostgreSQL?

Do stored procedures add something valuable or is in most cases basic Hibernate enough?
It seems like going behind Hibernates back.

Are the any good practices or patterns?

As said, the project is from scratch, so there are no preexisting stored procedures or even tables.
Regards,
David


Top
 Profile  
 
 Post subject: Re: Use stored procedures in a new project?
PostPosted: Mon Sep 20, 2010 8:13 am 
Regular
Regular

Joined: Sun Feb 14, 2010 3:29 pm
Posts: 58
Location: USA
You will likely get some mix answers until you try it your own. But in general I would recommend NOT to use store procedure unless you have no choice. Store procedure is hard to debug and maintain, and it's not a OO language (Java). Not to mention that Stored Proc is highly NOT portable! The number one big benefit of store procedure is that it should* off load your processing power to the DB instead on your application server. Also placing computing logic right on a DB, which closest to the data is typically faster, verse you pull them out into your Hibernate and process them then save them back into the DB. But again same reason you typically don't write assembly code instead using Java on a high level application. Study your requirement carefully, and I would use store procedure only as needed.

_________________
Zemian Deng
------------
Need a Java Scheduler? Try
http://bitbucket.org/timemachine/scheduler


Top
 Profile  
 
 Post subject: Re: Use stored procedures in a new project?
PostPosted: Wed Sep 22, 2010 10:21 am 
Newbie

Joined: Wed Sep 22, 2010 10:00 am
Posts: 5
Stored Procedure is very useful for the project. It is a subroutine available to applications accessing a relational database system. The major difference is that UDFs can be used like any other expression within SQL statements, whereas stored procedures must be invoked using the CALL statement.

_________________
live dealer casino


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.