Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

JDBC scripting, Part 1

Introducing JudoScript, a functional scripting language

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone

JDBC (Java Database Connectivity) is a standard Java API for SQL database accesses. What does JDBC scripting mean? It means using JDBC for manipulating SQL databases in a way comparable to and beyond what native database clients do. JDBC scripting is an attractive, practical matter, because SQL databases are and will be the dominant data sources in any enterprise system. It is also important to note that all major RDBMS (relational database management system) vendors provide pure-Java JDBC drivers for their own products, so a capable JDBC scripting tool can easily take advantage of that capability. All you need is a JDBC URL and the JDBC driver jar file in the classpath. You can connect to multiple databases simultaneously for multisource, heterogeneous data processing.

Philosophically, JDBC scripting is part of a grandiose idea: using the Java platform, in addition to Java's traditional role as an object-oriented language, to regularly perform practical computing tasks. The JudoScript language was designed for this idea.

Today, enterprise software handles not only relational databases, but also richer data formats such as XML and SGML, abstract data types such as Enterprise JavaBeans (EJB), Web services, as well as old friends such as flat files and spreadsheets. Spreadsheets are so popular in business—they are touted as the language of business. Traditionally, and naturally, people use various tools for data querying, reporting, and processing. Wouldn't it be nice to have a unified tool for all data-processing needs? The benefits are obvious:

  • You can do any processing with any data sources of any format simultaneously
  • Correct solutions and results are faster to reach
  • You have less tools to learn, install, configure, and launch
  • A single, free tool is cheaper to own
  • The problem solving process is mentally less taxing because you can focus on the problem at hand without constant worries over environmental issues, context switching, and integration of heterogeneous components


Java looks like a candidate, but it falls short as a practical tool because as a system language, Java is designed for creating object-oriented software systems; it is too verbose and detail-oriented for practical uses. Various Java scripting languages may help; they can "script" Java components and are easier to code, but they are just as programming-centric and detail-oriented as Java or Pascal.

A good scripting tool should have abstract functional features for people to intuitively specify today's common computing tasks and, at the same time, not lose programming power. This is the design goal of the JudoScript language.

Pure SQL is so limited, simple query tools are weak in capability. JudoScript has many powerful data structures and is fully potent to script Java components. You can use JudoScript to easily collect data from database A, compute some intermediate result in memory, and finish the task with database B. If you use Oracle, for example, you will need to use PL/SQL, database links, and possibly temporary tables. If database B is not an Oracle database, things can quickly spin out of control. JudoScript can easily deal with flat files, spreadsheets, XML, SGML, EJBs, etc. It is the synergy of all these capabilities that makes JudoScript's JDBC scripting so cool and useful, especially for J2EE applications.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources