![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello all, I am new to using an Object Relational Mapping Framework to provide database connectivity. The last large project I worked on was in C++ and we wrote the Persistence Mechanism ourselves - CRUD for a base class and all Business Objects inherited from this and specialized the methods to provide DB specific SQL calls. I understand the placing SQL in the Business Objects is now frowned upon by some and that we "should" add one more level of abstractions. Anyway, onto my question. I spoke to an experienced Java consultant yesterday that we brought in at an exorbitant price. I asked him his thoughts on using ORM for the project we are working on. He told me that in his experience he had usual written the classes for database himself and let the DB take care of issues such as Transactions and Connection Pooling. |
|
If the DB can do this for you what are the benefits. * Saving a lot of coding for sure. * Simplicity in mapping objects to the relational space. ok. What are the other cons of letting the DB manage this as opposed to using an ORM? Can the DB provide all the features of the ORM in and of itself? (We are using DB2 UDB for the IBM iSeries. V5R2) I'd also like to hear thought on placing the database connectivity inside the Business Objects. Any help would be greatly appreciated, Jason Jason jasonu (AT) vsac (DOT) org Vermont Student Assistance Corporation |
#3
| |||
| |||
|
|
What are the other cons of letting the DB manage this as opposed to using an ORM? Can the DB provide all the features of the ORM in and of itself? (We are using DB2 UDB for the IBM iSeries. V5R2) |
#4
| |||
| |||
|
|
jasonu (AT) vsac (DOT) org (Jason Us) wrote in message news:<45fe56bb.0311041105.f667405 (AT) posting (DOT) google.com>... What are the other cons of letting the DB manage this as opposed to using an ORM? Can the DB provide all the features of the ORM in and of itself? (We are using DB2 UDB for the IBM iSeries. V5R2) at the end of the day, the database WILL manage transactions if you need to write something. Yet there is one point to take care of * if you want to have so called optimistic transactions at the OO code level, you better have an access layer * if you need pessimistic transactions only - let the database do it but I've never seen a serious business application that used pessimistic locking - read a customer for update - the teller goes have a coffee and the databases has that one customer locked all the time while your user has a Cappucino at StarBucks :-) |
|
Not using an access layer and writing it oneself is only useful and better for very small and simple projects. If you need some arguments, why it is better to use some kind of ORM have a look at http://www.objectarchitects.de/Objec...3/Keller_Persi |
#5
| |||
| |||
|
|
"Wolfgang Keller" <wk (AT) objectarchitects (DOT) de> wrote in message news:ae01a906.0311051345.4234bc4a (AT) posting (DOT) google.com... jasonu (AT) vsac (DOT) org (Jason Us) wrote in message news:<45fe56bb.0311041105.f667405 (AT) posting (DOT) google.com>... What are the other cons of letting the DB manage this as opposed to using an ORM? Can the DB provide all the features of the ORM in and of itself? (We are using DB2 UDB for the IBM iSeries. V5R2) at the end of the day, the database WILL manage transactions if you need to write something. Yet there is one point to take care of * if you want to have so called optimistic transactions at the OO code level, you better have an access layer * if you need pessimistic transactions only - let the database do it but I've never seen a serious business application that used pessimistic locking - read a customer for update - the teller goes have a coffee and the databases has that one customer locked all the time while your user has a Cappucino at StarBucks :-) Apparently, either you do not consider banking serious, or you do not understand transactions particularly well. Every ATM (and every teller's terminal) uses pessimistic locking in its transactions. Not using an access layer and writing it oneself is only useful and better for very small and simple projects. If you need some arguments, why it is better to use some kind of ORM have a look at http://www.objectarchitects.de/Objec...3/Keller_Persi stenceOptions.pdf Why do Germans seem so enamored with this crap? Am I imagining it? Or is there some cultural attraction? |
#6
| |||
| |||
|
|
Apparently, either you do not consider banking serious, or you do not understand transactions particularly well. Every ATM (and every teller's terminal) uses pessimistic locking in its transactions. |
#7
| |||
| |||
|
|
Bob Badour wrote: Apparently, either you do not consider banking serious, or you do not understand transactions particularly well. Every ATM (and every teller's terminal) uses pessimistic locking in its transactions. an ATM is not exactly a business information system... but you're right. For such short things one should use pessimistic transactions and indeed I havent seen too many banks who use access layers as most of them use CICS, IMS or other similar things. Thank you Bob, I didn't know :-) |
![]() |
| Thread Tools | |
| Display Modes | |
| |