The Artima Developer Community
Sponsored Link

Java Community News
IBM's JLINQ Brings Language-Integrated Querying to Java

3 replies on 1 page. Most recent reply: Aug 26, 2007 2:32 AM by Achilleas Margaritis

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

IBM's JLINQ Brings Language-Integrated Querying to Java Posted: Aug 17, 2007 9:18 AM
Reply to this message Reply
Summary
Language-integrated querying is already part of Microsoft's .NET environment via the LINQ framework. IBM recently released a similar tool for Java, JLINQ, an Eclipse plug-in that Azadeh Ahadian, one of its designers, describes in an IBM developerWorks article.
Advertisement

Database programming languages (DBPL) promise to bring database access and programming languages closer by providing language-specific constructs that work with persistent data. Much recent development in DBPLs has focused on providing language-specific querying facilities for modern enterprise languages such as C# and Java.

In a developer-focused article, JLINQ: IBM's new paradigm for writing Java database applications, IBM's Azadeh Ahadian describes a new Eclipse-based tool, JLINQ that provides integrated querying capabilities for the Java language. JLINQ makes it possible to bring database objects into the language via special classes that automatically implement querying functions. Such classes go far beyond just simple CRUD operations, and can include complex queries that are optimized at compile time.

In a recent IBM developerWorks article, JLINQ engineer Azadeh Ahadian provides a tutorial on this new Eclipse-based database tool. Her article describes the process of objectization, turning relational data into Java objects:

This is accomplished through user-initiated automatic transformation of relational data into Java objects for access and manipulation of data. In turn, these objects can be seamlessly utilized in a natural OO programming paradigm to write the business logic and the underlying code. JLINQ's functionality in effect eliminates traditional JDBC programming by integrating the query language with Java.

Ahadian points out that JLINQ automates much of the process of integrating database objects with Java objects:

[JLINQ] automatically provides the design and runtime means for managing relational data as objects. The design provides the means for the developer to specify a database connection ... thus enabling the Eclipse Java project to be aware of the underlying database artifacts (such as tables, stored procedures, and so on).

Once the connection and the auto discovery of all database artifacts are completed, users can intuitively, through the GUI, transform any one of the underlying relational table entities into a Java object. This is accomplished through auto generation of the relevant SQL statements and auto creation of the parent Java objects that encapsulate those statements. The generated Java objects and the contained SQL statements can be further customized in a natural Eclipse IDE programming environment with full integrated SQL and Java editing capabilities.

Additionally performance analysis of selected SQL statements at design time can be performed through the launch of Visual Explain, thus providing the graphical representation of the optimizer implementation of a query request.

What do you think of language-integrated querying and of IBM's JLINQ?


James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: IBM's JLINQ Brings Language-Integrated Querying to Java Posted: Aug 17, 2007 9:53 AM
Reply to this message Reply
It seems like an overcomplicated way to tightly couple your code to the database. Just my impression. When I look at tools like this, I feel like they solve the wrong problem.

I'm personally against making my applications aware of the database artifacts. The application logic should not be aware of how data is persisted or even whether it is persisted. That should be dealt with in a quarantined area of the application often called the persistence layer. Anything that helps build strong dependencies between my code and the RDBMS is unwelcome.

Getting data from the DB into Java objects is trivially easy. It's writing it back to the database in a reliable and safe fashion that is difficult. If you don't need to update existing rows in the database (which is the case in a lot the work I do lately) this kind stuff seems like a huge overkill to me. Even when we need to update, I think we just need to let go a little and stop micromanaging the database inside our Java code.

Isaac Gouy

Posts: 527
Nickname: igouy
Registered: Jul, 2003

Re: IBM's JLINQ Brings Language-Integrated Querying to Java Posted: Aug 17, 2007 11:34 AM
Reply to this message Reply
Frank Sommers wrote "...recently released a similar tool for Java, JLINQ"

I've only glanced but so far I don't see why you say it's similar to LINQ - where's the language integration?

Achilleas Margaritis

Posts: 674
Nickname: achilleas
Registered: Feb, 2005

Re: IBM's JLINQ Brings Language-Integrated Querying to Java Posted: Aug 26, 2007 2:32 AM
Reply to this message Reply
Why not simply save/load objects to/from the database, use callbacks for query criteria, and let the engine handle schema changes and indexing?

Flat View: This topic has 3 replies on 1 page
Topic: Santhosh D'Souza on Proximity Communication Previous Topic   Next Topic Topic: Jython 2.2 Released

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use