For the before/after trigger:
Well, a before trigger can prevent the work from ever taking place -- an AFTER trigger will have allowed the work to happen. So, if you were using a statement trigger to do additional privilege checking -- it would be infinitely more performant in a BEFORE trigger, thereby preventing the work from ever happening (less wasted cycles processing a statement that will be rolled back which itself is expensive).
A before row level trigger can modify the :new values, an after row trigger cannot.
For the on delete cascade:
If you did not have the on delete cascade, you will have to explicitly delete from the child tables PRIOR to deleting from the parent table.
and lastly on the jre version, this information is available in the system properties:
ops$tkyte@ORA817DEV.US.ORACLE.COM> create or replace and resolve java source named "ver"
2 as
3 public class util
4 {
5 public static void prop()
6 {
7 System.getProperties().list(System.out);
8 }
9 public static String ver()
10 {
11 return System.getProperty("java.version", "unknown");
12 }
13 }
14 /
Java created.
ops$tkyte@ORA817DEV.US.ORACLE.COM>
ops$tkyte@ORA817DEV.US.ORACLE.COM> create or replace procedure jdk_props as language java name 'util.prop()';
2 /
Procedure created.
ops$tkyte@ORA817DEV.US.ORACLE.COM>
ops$tkyte@ORA817DEV.US.ORACLE.COM> create or replace function jdk_ver return varchar2 as language java name
2 'util.ver() return java.lang.String';
3 /
Function created.
ops$tkyte@ORA817DEV.US.ORACLE.COM> begin
2 dbms_java.grant_permission( user,
3 'java.util.PropertyPermission',
4 '*',
5 'read,write' );
6 commit;
7 end;
8 /
PL/SQL procedure successfully completed.
ops$tkyte@ORA817DEV.US.ORACLE.COM> set serveroutput on size 1000000
ops$tkyte@ORA817DEV.US.ORACLE.COM> exec dbms_java.set_output(1000000)
PL/SQL procedure successfully completed.
ops$tkyte@ORA817DEV.US.ORACLE.COM> exec jdk_props
-- listing properties --
java.specification.name=Java Platform API Specification
java.version=1.2.1
oracle.aurora.mts.INIT=oracle.aurora.mts.rdbms.INIT
user.timezone=EST
java.specification.version=1.2
java.vm.vendor=Oracle Corporation
java.vm.specification.version=1.0
user.home=
java.naming.factory.initial=oracle.aurora.namespace.InitialContex...
os.arch=sparc
java.vendor.url=</code>
http://www.oracle.com/java/ <code>
file.encoding.pkg=sun.io
user.region=US
java.home=/export/home/ora817/javavm/
java.class.path=
line.separator=
java.io.tmpdir=/var/tmp/
jdbc.drivers=oracle.jdbc.driver.OracleDriver
os.name=Solaris
java.vendor=Oracle Corporation
oracle.jserver.version=8.1.7
oracle.server.version=8.1.7
java.library.path=/export/home/ora817/lib
java.vm.specification.vendor=Sun Microsystems Inc.
oracle.aurora.namespace.INIT=oracle.aurora.namespace.rdbms.INIT
oracle.aurora.rdbms.SID=ora817dev
file.encoding=ISO8859_1
oracle.aurora.mts.session.INIT=oracle.aurora.mts.session.rdbms.INIT
java.specification.vendor=Sun Microsystems Inc.
oracle.aurora.vm.environment.name=rdbms
user.name=
user.language=en
java.vm.name=JServer VM
java.vm.specification.name=Java Virtual Machine Specification
java.class.version=46.0
oracle.aurora.rdbms.oracle_home=/export/home/ora817/
sun.boot.library.path=/export/home/ora817/lib:/export/home/...
sqlj.runtime=sqlj.framework.ide.aurora.rdbms.Oracl...
java.naming.factory.url.pkgs=oracle.aurora.ejb.jndi:com.sun.jndi.u...
java.protocol.handler.pkgs=oracle.aurora.rdbms.url
os.version=5.7
java.vm.version=1.2.1
java.compiler=
path.separator=:
file.separator=/
user.dir=
PL/SQL procedure successfully completed.
ops$tkyte@ORA817DEV.US.ORACLE.COM> select jdk_ver from dual;
JDK_VER
--------------
1.2.1