Two ideas come to mind off the top of my head.
(1) If you're using Oracle8 or Oracle8i and you
*already* have your complex database views
in place (which don't allow updates due to
joins or aggregation in the View's SQL query),
you can make use of a feature introduced in
Oracle8 called INSTEAD OF triggers on the view.
You can say:
CREATE TRIGGER my_trigger
INSTEAD OF INSERT ON myViewName
FOR EACH ROW
BEGIN
-- PL/SQL Code or invoke Java Code
END;
The trigger can be INSTEAD OF INSERT, UPDATE and/or DELETE
for the view. This lets you write code that handles
the DML operations for your complex view in a way that's
right for your application, leaving clients unaware
that your view is not fully updateable. Or...
(2) You can use our now-production Oracle Business Components
for Java framework (part of the also-now-production
JDeveloper 3.0 product) to implement Entity Objects for
each table in question, to create a View Object joining
your tables in any way imaginable in SQL, and then deploy an
EJB Session Bean for your application that allows these
Joined views of arbitrary complexity to (a) be fully
scrollable and fully updateable, and (b) uniformly
enforce business logic encapsulated in the underlying
entities.
See http://technet.oracle.com/products/jdev for whitepapers
and more info.
_________________________________________________________
Steve Muench, Consulting Product Manager & XML Evangelist
Business Components for Java Development Team
http://technet.oracle.com/tech/java
http://technet.oracle.com/tech/xml
----- Original Message -----
From: Pascuzzi Domenico <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, November 28, 1999 8:46 AM
Subject: View
| I have a view in my db:
| VIEW = (TABLE1, TABLE2)
| having two tables as source of data.
| My DBMS don't allow to update via view.
| How can I approach using ejb?
| An entity for all tables?
| Or an entity for the view and for the table?
| Thank you!
|
|
===========================================================================
| To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
| of the message "signoff EJB-INTEREST". For general help, send email to
| [EMAIL PROTECTED] and include in the body of the message "help".
|
|
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".