Advanced SQLJ Samples

SQLJ Advanced Samples demonstrate the usage of various advanced features of SQLJ. All the samples have also been certified on Red Hat Linux Advanced Server 2.1 

BFILE Datatype [09-Apr-2003]
An external file, or BFILE, is used to store a locator to a file outside the database, stored somewhere on the filesystem of the data server. The locator points to the actual location of the file. This sample application demonstrates how to manipulate the BFile column type of a database table.
Download Now (JAR,30KB)
Readme
Source

Collection Datatype (strongly typed) [09-Apr-2003]
VARRAY and Nested tables are used to store collections. A VARRAY is an ordered set of data elements. All elements of a given VARRAY are of the same datatype. Each element has an index, which is a number corresponding to the element's position in the VARRAY. A nested table type models an unordered set of elements. The elements may be built-in types or user-defined types. One can view a nested table as a single-column table or, if the nested table is an object type, as a multicolumn table, with a column for each attribute of the object type. This sample illustrates how to access Collections (i.e Nested tables and Varrays) from the database using SQLJ.
Download Now (JAR, 30KB)
Readme
Source

Collection Datatype (weakly typed) [09-Apr-2003]
Oracle JDBC will materialize any object stored in database as an instance of the oracle.sql.STRUCT class, if one does not supply a custom Java class for SQL->Java mapping of an Oracle object .This sample accesses the database Object Types and Object REFs using the Oracle JDBC driver extension classes: STRUCT, REF and ARRAY. This is a weakly typed access to these Oracle Datatypes.
Download Now (JAR, 26KB)
Readme
Source

LOB Datatype [09-Apr-2003]
The built-in LOB datatypes BLOB, CLOB, and NCLOB (stored internally) and BFILE (stored externally), can store large and unstructured data such as text, image, video, and spatial data up to 4 gigabytes in size. When creating a table, one can optionally specify different tablespace and storage characteristics for LOB columns or LOB object attributes from those specified for the table. This sample application illustrates insertion, retrieval and manipulation of LOB columns in an Oracle database using SQLJ.
Download Now (JAR, 56KB)
Readme
Source

Java Object[09-Apr-2003]
There are many instances when application programmers want to store and retrieve Java Objects in database. The standard JDBC getObject() method of a result set or callable statement returns data into a java.lang.Object object. This sample application illustrates retrieval and manipulation of Java objects in an Oracle database using SQLJ.
Download Now (JAR, 29KB)
Readme
Source

Oracle Object [09-Apr-2003]
There are many instances when application programmers want to store and retrieve Oracle specific Java Objects in database. This sample illustrates oracle.sql mapping to retrieve data from the Oracle database using SQLJ.
Download Now (JAR, 27KB)
Readme
Source

Oracle Mapping [09-Apr-2003]
This sample illustrates oracle.sql mapping to retrieve data from the Oracle database. This sample retrieves oracle datatype columns into oracle.sql classes. oracle.sql classes (like NUMBER, CHAR etc), store the column data in SQL data format and hence the overhead of conversion to java types is eliminated.
Download Now (JAR, 24KB)
Readme
Source

Stream Datatypes [09-Apr-2003]
Whenever arbitrary big binary data is stored in database columns or objects, one can use Java InputStream and OutputStream to store/retrieve data conveniently. This sample illustrates how data can be accessed as streams in SQLJ. Using SQLJ stream data can be read in three formats: Unicode, Binary and ASCII. This sample reads a sample text file from a database table in the chosen streaming format.
Download Now (JAR, 20KB)
Readme
Source

 
Left Curve
More Sample Code
Right Curve
 · Basic SQLJ Samples
 · Oracle 9i SQLJ Samples
 · JDBC Samples

Left Curve
Discussions
Right Curve
 · Sample Code Forum
 · SQLJ/JDBC
 · Java Stored Procedures

Left Curve
Tutorials
Right Curve
 · JDBC Developer's Guide
 · SQLJ Developer's Guide
 · Oracle Java Roadmap : JDBC

Left Curve
How-To Documents
Right Curve
 · JDBC
 · Java Stored Procedures
 · J2EE
 · JavaServer Pages
 · JMS
E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy