Subject | Re: To SP or not |
---|---|
Author | johnsparrowuk |
Post date | 2004-06-01T19:34:57Z |
Having thought about it a little more, I would say the only
ligitimate reason for sproc / trigger code is to compensate for
deficiencies in the declaritive language. In the same way triggers
were used in Oracle 5, 10-15 years ago, to maintain foreign keys.
When your declaritive language is sufficiently advanced to cope, the
need for embedded code on the server for non-business logic
disappears.
Not to say that FB hasn't 'got there' yet in terms of sophisiticated
SQL, just the startard itself has some way to go. In 10-20 years,
who knows!
John
--- In firebird-support@yahoogroups.com, "johnsparrowuk"
<jsparrow@e...> wrote:
ligitimate reason for sproc / trigger code is to compensate for
deficiencies in the declaritive language. In the same way triggers
were used in Oracle 5, 10-15 years ago, to maintain foreign keys.
When your declaritive language is sufficiently advanced to cope, the
need for embedded code on the server for non-business logic
disappears.
Not to say that FB hasn't 'got there' yet in terms of sophisiticated
SQL, just the startard itself has some way to go. In 10-20 years,
who knows!
John
--- In firebird-support@yahoogroups.com, "johnsparrowuk"
<jsparrow@e...> wrote:
> I seem to remember reading an artical about this years ago.company
> Apparently there was some 'discussion' inside the Interbase
> when Borland bought it, about the usefulness of SP (and I assumeembedded
> triggers too). I got the impression the people at Interbase saw no
> advantage in it, but were forced by Borland.
>
> Their argument was that there was no speed advantage - over
> SQL. Borland finally 'talked them round' by arguing it wasn'tabout
> speed, but encapsulation. (I got the impression a phrase like 'doit
> or else...' was also involved!!)the
>
> I have really mixed feelings about the whole 'embedding code on
> db server' issue. It has lots of advantages of course (speed couldbe
> one). But I feel the proper place for business logic is in thebut
> application layer, the database should just store data, do joins,
> manage transactions etc.
>
> Why? well the best reason is that your fb server is a precious
> resource. You can do busines logic anywhere (multi app servers)
> unless you go down the replication route, you've only got 1database!
> And when you start embedding code, it's easy to drift into puttingmuch
> business logic in there too.
>
> That said, I do use SP's and triggers all the time. I just try to
> avoid complex business logic...
>
> John
>
> --- In firebird-support@yahoogroups.com, "Alfred Thomas"
> <alfred@f...> wrote:
> > Hi
> >
> > I have a question, which I hope is not too off-topic.
> > We are designing a system and have to decide whether to add as
> of thefrom
> > code as possible as stored procedures. Or should we stay away
> storedanyone
> > procedures as much as possible. I am very much pro SP. Can
> tell me ifwhy
> > there is a study/white paper/faq/whatever that explains why or
> not to
> > take either of the approaches.
> >
> > Regards
> > Alfred Thomas