Re: Application Design and PostgreSQL
От | Buddy Lee Haystack |
---|---|
Тема | Re: Application Design and PostgreSQL |
Дата | |
Msg-id | 3B548C22.C3EB998D@email.rentzone.org обсуждение исходный текст |
Ответ на | Application Design and PostgreSQL (Janning Vygen <vygen@planwerk6.de>) |
Список | pgsql-general |
> If i have all logic inside the database i dont need a middleware to > prevent the data from getting corrupted via other tools. > > wouldnt it be fine to have all logic inside the database and i can > use my object orientaded wrapper or a frontend like pgsql or > something else. It seems to me that it would make more sense if all > logic is inside the databse because i can prevent my data from being > corrupted. > > AND: What happens if i change a type from int2 to int4 inside the > databse. i still have to maintain the middleware. So i always have to > keep two things up to date. There will always be some logic inside > the database at least something like types. > > Is your opinion to put mostly every business logic inside the > middleware just because the object orientated approach inside > databases isnt standarized yet? Middleware is good! By using a database as a fancy "filing cabinet," and implementing the logic in the middleware applications that feed the DB all the SQL commands and format the results returned by the database, you've not only reduced your dependence on one vendor, but you've enabled your company to increase the scale of its operations in a more agile manner. A personal example: My first database driven website used MS Access as the database and ColdFusion as the middleware product. Everything was fine until visitors started accessing the site. ;) Shortly thereafter, I switched from using MS Access to MS SQL server. All I had to do was dump the data from Access & import the data into MS SQL server. I didn't need to modify my application to access the more powerful database. Six months after the MS SQL server database couldn't handle the load, I migrated from the MS SQL server database to Oracle, and again didn't have to change any of my middleware code. Five months after our budget cuts, I dumped the outrageous Oracle support fees, and moved the database over to PostgreSQL, and migrated the ColdFusion middleware applications over to an open source solution [Linux, mod_perl, DBI and Apache::DBI] with just a little bit of effort. The open source solution has been in use for three years, and has proven to be far more reliable, robust, FLEXIBLE, and AGILE than any of the far more costly, closed source solutions I had previously implemented at Prudential and Merrill Lynch. Had it not been for the middleware layer, I would never have been able to make the transitions that were required to enable our clients to flourish. Bye!
В списке pgsql-general по дате отправления: