Re: Thoughs after discussions at OSCON
От | Chris Travers |
---|---|
Тема | Re: Thoughs after discussions at OSCON |
Дата | |
Msg-id | 42FFBDD5.60508@travelamericas.com обсуждение исходный текст |
Ответ на | Re: Thoughs after discussions at OSCON ("Jim C. Nasby" <jnasby@pervasive.com>) |
Ответы |
Re: Thoughs after discussions at OSCON
|
Список | pgsql-advocacy |
Jim C. Nasby wrote: > > >I think you're both correct; 90% of people who use databases don't >understand how important maintaining the integrity of your data is. Tom >Kyte (http://asktom.oracle.com/) harps on this all the time, and there's >some articles in that website that provide some good explanations on why >you want as much business logic, etc as possible in the database and not >in some app server. > > Part of the problem is that you have a lot of people with different variations of the same opinions, but taking them in different directions. Getting this information to developers is hard because there is a lot of disagreement about how much logic one should put in the database. Personally I have never bought the "Put as much logic into your database as possible." This can *easily* be taken way too far. Review the discussions on pgsql-general about why sending email from the database backend is a bad idea. Can you write a CRM application server in PLPGSQL? Sure. But I am not sure it is a good idea..... What I do is set up a system with the following layers: User Interface UI logic Business Process Logic Database Access/Abstraction Data Presentation Data Maintenance Data Storage The lowest of the three layers should be implimented within the database itself. The top four layers are outside the database. Database Abstraction is simply the idea that if nothing else all your database calls should go through a single module so that if you need to change it later, you can. This also facilitates the development of 3-tier systems and helps people decide *intelligently* what logic to put in the database. The fact of the matter is, your data integrity should be defined independently of your application and the structure of the database should enforce that integrity itself. The ideal database is self-enforcing, self-describing, and allows for information presentation to be independent from storage. Besr WIshes, Chris Travers Metatron Technology Consulting
В списке pgsql-advocacy по дате отправления: