Amazon
Sunday, May 30, 2010
Oracle - Using NULL statement
Saturday, May 29, 2010
Oracle - Using Lables
DECLARE
ctr constant INTEGER := 11;
BEGIN
FOR ctr IN 1..25 LOOP -- ctr is declared locally in FOR loop
IF main.ctr > 10 THEN -- Using main label it refers to global variable
dbms_output.put_line('hello');
END IF;
END LOOP;
END main;
Transient - Can they be used for optimizaton?
Control serialization in remote EJBs
When you decide to write your code for distributed /remote object you need to carefully choose what method parameters you want to send over the network,for example when you pass an object like this :
remoteObject.setPersonInfo(person); // call remote object by passing object
here, not only the PersonInfo object will be serialized and sent over network but all the total PersonInfo object graph (variables and it's super class variables except transient variables) will also be sent through network because of default behavior. You might want to send only PersonInfo object only but not total object graph.
To avoid this problem, use 'transient' key word for the attributes that need not be sent over the network.
Monday, May 17, 2010
Oracle - Using Ref Cursors
type rec_emp is record
(
name varchar2(20),
sal number(6)
);
er rec_emp;
begin
open c_emp;
loop
fetch c_emp into er;
exit when c_emp%notfound;
dbms_output.put_line(er.name || ' - ' || er.sal);
end loop;
end;
/
create or replace procedure emp_rec_pro is
type emp_ref is REF CURSOR;
emp_cur emp_ref;
BEGIN
open emp_cur for select ename name, sal from emp where sal>250;
emp_proc_ref_cur (emp_cur);
end;
/
Sunday, May 16, 2010
Oracle PL/SQL Notes - 3
Thursday, May 13, 2010
Oracle PL/SQL Notes - 2
Oracle PL/SQL Notes - 1
Wednesday, May 12, 2010
EJB 2.0 Chapter 02 The Client View
javax.ejb.EJBLocalObject
For EJB, the communication between the server and the client is based on RMI (both remote and local interfaces, in fact, do implements thejava.rmi.Remote interface).
The underlying protocol that it is used for the communication is IIOP (I think 1.2), that is part of CORBA standards. It is normally used to describe this communication system using the Java RMI over IIOP.
IIOP has not been designed for Java, but for generic languages, and this means that there are some limitations. Some languages, in fact, do not have the concept of casting.
Java RMI-IIOP provides a mechanism to narrow the the Object you have received from from your lookup, to the appropriate type. This is done through the javax.rmi.PortableRemoteObject class and, more specifically, using the narrow() method.
Just a note: when you are using the new EJB 2.0 Local Client API, you should be able to do a direct/explicit cast from the looked up Object, to the interface you need.
- aWire protocol of CORBA.
- Can propagate both Transaction and Security information, and can't be sent with a non-IIOP remote method call, so IIOP lets container inter-operate with other servers, including one that isn't Java-based.
- All EJBs must be IIOP Compliant.
EJB 2.0 Chapter 01 EJB Architecture
Figures out which method to call on which object.
Calls method on Remote Object.
Tuesday, May 11, 2010
Oracle Views
Oracle Synonyms
- An object owned by current user.
- A private synonym owned by current user.
- A public synonym.
Oracle Indexes
- By RowID - Mapping column data to ROWIDs for the columns of interest.
- By Full Table Scan
- Default and most common index type.
- Can be unique or non-unique and either simple (one column) or concatenated (multi cols).
- Provides best performance on high cardinality (many distinct values) columns.
- Offer methods to retrieve small number of interesting rows.
- Can be used if any combination of the leading columns of the index are used in the SQL. For ex - The OE.INVENTORIES table has the index INVENTORY_PK on the PRODUCT_ID (leading) and WAREHOUSE_ID columns. We can use this INVENTORY_PK index with the following query:
- Primarily used for decision-support systems or static data, because they do not support row level locking.
- Like B-Tree indexes they can also be simple or concatenated.
- Best used for low or medium cardinality columns.
- Index is constructed by storing the bit-maps in the leaf nodes of a B-Tree structure. The B-Tree makes it easy to find the bitmaps of interest quickly.
- Bitmaps are stored in compressed format, so takes less disk space comparison to B-Tree index.
Amazon Best Sellors
TOGAF 9.2 - STUDY [ The Open Group Architecture Framework ] - Chap 01 - Introduction
100 Feet View of TOGAF What is Enterprise? Collection of Organization that has common set of Goals. Enterprise has People - organized by co...
-
100 Feet View of TOGAF What is Enterprise? Collection of Organization that has common set of Goals. Enterprise has People - organized by co...
-
Dead-letter queues The dead-letter queue (or undelivered-message queue) is the queue to which messages are sent if they cannot be routed to...
-
01002 A DISCONNECT error occurred. 01003 Null values were eliminated from the argument of a column function. 01004 The value of a string was...