Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 19th, 2005, 03:19 PM
JGeer JGeer is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 14 JGeer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 9 m 57 sec
Reputation Power: 0
Design advice

I’m developing a commercial application that uses Firebird. At the moment I have all my queries coded in stored procedures.

The process to deploy updates to my app I think is going to be painful, because for example, in order to modify a field I have to delete every stored procedure that reference that field, make the modifications and recreate the stored procedures.

I'm thinking of dropping all my stored procedures and use dynamic sql directly from my code.

I would like to know your opinion about this. What drawbacks can I expected?

Reply With Quote
  #2  
Old August 20th, 2005, 01:16 PM
billkat billkat is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Posts: 7 billkat User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 38 m 40 sec
Reputation Power: 0
Post

I am working on an accounting package and from my point of view you should use both. while updating database it is good to use direct sql statment from program, but some complex quries could not be performed easily in program. SPs are quite helpful for me when i need formatted data for reports, and in case of big queries itis very handy cause it minimize the time of result which is critical in big programs , as it is in my case.
So use SQL and SP side by side according to your requirement.

Reply With Quote
  #3  
Old August 22nd, 2005, 02:46 AM
fikret fikret is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Location: Sarajevo, Bosnia
Posts: 111 fikret User rank is Corporal (100 - 500 Reputation Level)fikret User rank is Corporal (100 - 500 Reputation Level)fikret User rank is Corporal (100 - 500 Reputation Level)fikret User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 5 h 17 m 43 sec
Reputation Power: 7
Quote:
Originally Posted by JGeer
I'm thinking of dropping all my stored procedures and use dynamic sql directly from my code.



Jusm make sure that ALL queries will be faster if prepared once and executed many times.
I mean, try to make every query parametarized, so you can pass only param values to them. I know that this is not allways possible...

--
Best regards,
Fikret Hasovic http://fikret.fbtalk.net
USAID TAMP Senior Programmer

* Firebird Foundation Committee member.
- Join today at http://www.firebirdsql.org/ff/foundation
* JEDI VCS contributor
http://jedivcs.sourceforge.net/
* Firebird and Fyracle news
http://www.fyracle.org

Reply With Quote
  #4  
Old August 23rd, 2005, 02:53 AM
SilverDB's Avatar
SilverDB SilverDB is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Romania
Posts: 173 SilverDB User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 45 m 53 sec
Reputation Power: 4
Send a message via Yahoo to SilverDB
Lightbulb

Quote:
Originally Posted by JGeer
... in order to modify a field I have to delete every stored procedure that reference that field, make the modifications and recreate the stored procedures...

You could also try to comment the procedure(s) like this:
/* PROCEDURE TEXT
PROCEDURE TEXT */
(creating a routine that comments a given procedure would probably be a piece of cake)
then modify what you need ... then uncomment it
__________________
If i've been helpful, please add to my reputation.
My unfinished site: http://www.dever.ro

Reply With Quote
  #5  
Old August 23rd, 2005, 03:25 AM
egidy egidy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 166 egidy User rank is Private First Class (20 - 50 Reputation Level)egidy User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 15 h 49 m 31 sec
Reputation Power: 5
Simple matter - use select+cached updates for documents and stored procedures for select data for complex reports, why choose any other way?

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Design advice


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway