BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

sqlstatment

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OO design
View previous topic :: View next topic  
Author Message
jorge novoa
Guest





PostPosted: Sat Apr 28, 2007 11:56 pm    Post subject: sqlstatment Reply with quote



are the sql statments place on sqlstatement class?, even we're talking about classes and objects, at the end the goal its save, retrieve, etc. data from or to databases, so where do i have to store all sql statments matching with the user requests?
Back to top
Bob Dawson
Guest





PostPosted: Sun Apr 29, 2007 12:33 am    Post subject: Re: sqlstatment Reply with quote



"jorge novoa" <pippen_8 (AT) todito (DOT) com> wrote in message
news:463398d2$1 (AT) newsgroups (DOT) borland.com...
Quote:

so where do i have to store all sql statments matching with the user
requests?

There are at least four main options

1. Use a datamodule in support of each BO class. Store each class's
statements there where only the BO (or its persistence helper class) can get
it.
2. Store all SQL statements in local files, and load them from there. This
allows updating the sql without recompling; you just have to distribute an
updated SQL resources file..
3. Use a system for autogenerating SQL based on reading the BO or associated
metadata. This requires either a supporting design for the BOs, or a
developed metadata system that can guide runtime SQL creation. A bit more
complicated than either 1 or 2, but really reduces the total amount of time
spent on building and maintaining rote SQL statements.
4. Treat SQL statements as themselves a persistent BO domain: store SQL
statements in the database. Again, a bit more complicated, but this allows
for non-predictable SQL, mixing SQL statements and Stored Procs, and other
optimizations.

bobD
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OO design All times are GMT
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.