Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> c.d.o.misc -> Business Logic in User Defined Types

Business Logic in User Defined Types

From: <>
Date: 9 Feb 2006 07:23:52 -0800
Message-ID: <>

I would like some feedback on using user defined types to store business logic in Oracle. For instance all business logic for say a User entity would be placed in a User Defined Type. Modification of such data would be accomplished by instantiating the "User object" and using getter and setter methods, simillar to other OO languages. A save method would be used for the Inserts, Updates, Deletes. This would allow a check rules method where business logic could be checked before updates for instance, regex on email addresses, phone numbers, checking priviledges of the user. If another application were to need to access and manipulate the user object in a different way, a derived object could be created overriding rule checking of its super object. I am familliar with the caveats of OO pl/sql, like true encapsulation, and limits on datatypes, however the lure of inheriting objects and changing methods to suit the needs is very appealing. I have worked with applications where business logic resides in packages, these packages over time seem to get very bloated with conditional logic, if this then that but only when so on... Objects would allow changes using the open closed principal and therfore inheritance would be used for new functionality and not break existing code, as changing long procedures often does. Our organization is commited to Oracle so database independance will never be an issue, a third tier app server would just get in the way, our environment will always be homogenous. Anybody tried this, any reasons this is a bad idea, all feedback appreciated.

--Chris Received on Thu Feb 09 2006 - 09:23:52 CST

Original text of this message