Understanding PUREQUERY:IBM The latest Java database application programming paradigm

Source: Internet
Author: User
Tags inheritance split

Brief introduction

The object of relational data access

Most businesses are based on information management systems, and the primary underlying infrastructure of these information management systems is based on data stored in one or more relational databases. These systems are made up of software programs that specialize in information processing and are implemented in managed languages such as Java.

As an easy-to-use, object-oriented language characterized by encapsulation, inheritance, and polymorphism, Java is used to implement the computational and logical aspects of the information processing program and, on the other hand, to access and manipulate relational data. Java defines information by object, and the database uses rows. An object is the only instance of the class to which it belongs, and in physics there is a distinction between objects. Similarly, rows in a relational database are unique and are identified by primary key values. On the other hand, the object is independent and continues to exist as long as it is referenced by one or more other objects. Rows are included in the table and disappear as they are removed from the table.

Therefore, although objects are similar in many ways to rows, the intrinsic value of objects for modular programming lies in scalability, scalability, and efficient code maintenance, which is the design foundation of an object-oriented (objectization) abstract relational row. We define the object as a process in which object-oriented basic concepts (encapsulation, inheritance, and polymorphism) are introduced into the instruction, inline data query practices that are executed using SQL. In short, it is the process of creating a seamless object that can be used to perform database operations (including creation, substitution, update, and deletion) through a purely object-oriented paradigm.

The most popular way to programmatically access and manipulate relational data through an object is through APIs and wrappers that provide one or more SQL statements written as text strings. The entire relational data processing is based on these encapsulated SQL statements, which are an important part of the program logic. However, these SQL statements are not transparent to the Java language and do not enjoy the benefits of compile-time optimization and semantic and syntactic validation-not to mention design-time features such as content aids that can save a lot of time in the underlying design and implementation process.

Thus, one of the major challenges in improving programmer productivity and productivity is to write the underlying code by converting relational data into objects that can be used seamlessly in a natural object-oriented manner. To implement this transformation, a good understanding of how to arrange the order of data access API calls and a technical understanding of the underlying data access programming model (such as JDBC) also requires excellent programming skills and the ability to split software (especially its data access layer) into multiple modular parts.

The PureQuery project provides a GUI-enabled and easy-to-use approach for database application developers to significantly increase the productivity of the application's design and implementation phases. By automatically converting relational data into Java objects, users can access and manipulate data easily. After converting relational data to Java objects, it is natural to use these objects seamlessly to write business logic and underlying code through object-oriented programming paradigms. By integrating the query language with the Java itself, pureQuery can replace traditional JDBC programming.

This article outlines the PureQuery and provides a detailed scenario to show how pureQuery significantly improves programmer productivity.

What is PureQuery?

PureQuery is an eclipse-based, pluggable component that can be seamlessly integrated with the Eclipse Integrated development Environment (IDE). It automatically provides a design and run-time approach that allows relational data to be managed as objects. This design enables developers to specify a database connection, such as using db2®, and then enables the Eclipse Java project to recognize the underlying database artifacts (such as tables, stored procedures, and so on). After the connection is established and the automatic discovery of all database artifacts is completed, the user can visually convert any underlying relational table entity into a Java object through the GUI. This is done by automatically generating the relevant SQL statements and automatically creating the parent Java object that encapsulates the statements. You can then further customize the generated Java objects and the SQL statements contained in a natural Eclipse IDE programming environment using fully integrated SQL and Java editing capabilities.

The tight integration of the Java Editor with SQL can improve programming productivity, provide a seamless design-time experience, and simplify SQL coding when writing Java code. Editor integration includes semantic and syntactic validation that is fully supported during design-time compilation, content assistance, syntax coloring, and dynamic, selective execution of SQL in Java, and, when an error occurs, is flagged in the error panel like a Java error.

Also, the tight union between design and runtime allows SQL statements to run at design time. When you run the SQL statement, you will consider all the host variables and parameters used to preview the result set and automatically roll back the side effects of executing the SQL statement.

In addition, at design time, you can provide a visual representation of the optimizer implementation of a query request by starting Visual Explain to perform profiling of the selected SQL statement. The query request is split into different parts, and each part is represented by an icon. Visual Explain also includes information about the database objects that are considered and selected by the query optimizer. Visual Explain provides a detailed representation of the query implementation, and can be easily found in the integrated Sql-eclipse Java editor at design time to cause expensive costs.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.