AD-HOC QUERY BUILDER



Similar documents
Glassfish, JAVA EE, Servlets, JSP, EJB

EVALUATION OF SERVER-SIDE TECHNOLOGY FOR WEB DEPLOYMENT

Client-server 3-tier N-tier

ORACLE APPLICATION EXPRESS 5.0

Oracle Identity Analytics Architecture. An Oracle White Paper July 2010

Using Database Metadata and its Semantics to Generate Automatic and Dynamic Web Entry Forms

Course Number: IAC-SOFT-WDAD Web Design and Application Development

White Paper Converting Lotus Notes Applications to the Cloud Using the CIMtrek converter Product

Client/server is a network architecture that divides functions into client and server

DIPLOMA IN WEBDEVELOPMENT

CSc 230 Software System Engineering FINAL REPORT. Project Management System. Prof.: Doan Nguyen. Submitted By: Parita Shah Ajinkya Ladkhedkar

This document gives an outline of Tim Ward s work on mobile phone systems

zen Platform technical white paper

6.2 Reporting BIPublisher Improvements

DEVELOPMENT OF AN ANALYSIS AND REPORTING TOOL FOR ORACLE FORMS SOURCE CODES

Internet Engineering: Web Application Architecture. Ali Kamandi Sharif University of Technology Fall 2007

INTRODUCING ORACLE APPLICATION EXPRESS. Keywords: database, Oracle, web application, forms, reports

Customer Bank Account Management System Technical Specification Document

Sisense. Product Highlights.

Building Java Servlets with Oracle JDeveloper

Building and Using Web Services With JDeveloper 11g

Implementing the Shop with EJB

MBARI Deep Sea Guide: Designing a web interface that represents information about the Monterey Bay deep-sea world.

EAI-Low Level Design Document

DTWMS Required Software Engineers. 1. Senior Java Programmer (3 Positions) Responsibilities:

Specialized Programme on Web Application Development using Open Source Tools

ORACLE OLAP. Oracle OLAP is embedded in the Oracle Database kernel and runs in the same database process

How to Build an E-Commerce Application using J2EE. Carol McDonald Code Camp Engineer

General principles and architecture of Adlib and Adlib API. Petra Otten Manager Customer Support

2. Metadata Modeling Best Practices with Cognos Framework Manager

Oracle Data Integrator: Administration and Development

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

Software Re-Engineering and Ux Improvement for ElegantJ BI Business Intelligence Suite

SSC - Web development Model-View-Controller for Java web application development

Real SQL Programming 1

Specialized Programme on Web Application Development using Open Source Tools

Techniques for Scaling Components of Web Application

Release 1. ICAPRG604A Create cloud computing services

Net-WMS FP Net-WMS SPECIFIC TARGETED RESEARCH OR INNOVATION PROJECT. Networked Businesses. D.8.1 Networked architecture J2EE compliant

Cognos8 Deployment Best Practices for Performance/Scalability. Barnaby Cole Practice Lead, Technical Services

SQL Injection for newbie

Building Web Applications, Servlets, JSP and JDBC

CSCI110 Exercise 4: Database - MySQL

Web Presentation Layer Architecture

SQL Databases Course. by Applied Technology Research Center. This course provides training for MySQL, Oracle, SQL Server and PostgreSQL databases.

A Java proxy for MS SQL Server Reporting Services

Skills for Employment Investment Project (SEIP)

A framework for web-based product data management using J2EE

Cache Database: Introduction to a New Generation Database

Vendor: Brio Software Product: Brio Performance Suite

Application Express Web Application Development

TechTips. Connecting Xcelsius Dashboards to External Data Sources using: Web Services (Dynamic Web Query)

Adobe Systems Incorporated

INTRODUCTION OVERVIEW OF THE ORACLE 9I AND BI BEANS ARCHITECTURE. Chris Claterbos, Vlamis Software Solutions, Inc.

Administering batch environments

JAVA/J2EE DEVELOPER RESUME

COM 440 Distributed Systems Project List Summary

2012 LABVANTAGE Solutions, Inc. All Rights Reserved.

PHP Web Authoring for Database Management based on MVC Pattern

IAF Business Intelligence Solutions Make the Most of Your Business Intelligence. White Paper November 2002

Introduction to Sun ONE Application Server 7

SOFTWARE ARCHITECTURE FOR FIJI NATIONAL UNIVERSITY CAMPUS INFORMATION SYSTEMS

Fast and Easy Delivery of Data Mining Insights to Reporting Systems

Title Page. Hosted Payment Page Guide ACI Commerce Gateway

Java Application Developer Certificate Program Competencies

The Sierra Clustered Database Engine, the technology at the heart of

White Paper: 1) Architecture Objectives: The primary objective of this architecture is to meet the. 2) Architecture Explanation

Oracle Application Express Workshop

Holistic Performance Analysis of J2EE Applications

Turning ClearPath MCP Data into Information with Business Information Server. White Paper

Before you may use any database in Limnor, you need to create a database connection for it. Select Project menu, select Databases:

Migrate your Discover Reports to Oracle APEX

Application Performance Management for Enterprise Applications

Richmond SupportDesk Web Reports Module For Richmond SupportDesk v6.72. User Guide

GlassFish Security. open source community experience distilled. security measures. Secure your GlassFish installation, Web applications,

A Comparison of Enterprise Reporting Tools

Accessing Data with ADOBE FLEX 4.6

MySQL for Beginners Ed 3

ORACLE BUSINESS INTELLIGENCE, ORACLE DATABASE, AND EXADATA INTEGRATION

Japan Communication India Skill Development Center

NetBeans IDE Field Guide

Actuate Business Intelligence and Reporting Tools (BIRT)

Software Architecture Document

Oracle8/ SQLJ Programming

Virtual Credit Card Processing System

a division of Technical Overview Xenos Enterprise Server 2.0

International Journal of Engineering Technology, Management and Applied Sciences. November 2014, Volume 2 Issue 6, ISSN

A Tool for Evaluation and Optimization of Web Application Performance

Migrating a Discoverer System to Oracle Business Intelligence Enterprise Edition

Complete Java Web Development

Module 9 Ad Hoc Queries

Using Microsoft Business Intelligence Dashboards and Reports in the Federal Government

Computer Information Technology

Transcription:

AD-HOC QUERY BUILDER International Institute of Information Technology Bangalore Submitted By: Bratati Mohapatra (MT2009089) Rashmi R Rao (MT2009116) Niranjani S (MT2009124) Guided By: Prof Chandrashekar Ramanathan 1

Contents i. Acknowledgement 1. Introduction 2. Tools /Software used 3. N-tier architecture 4. Modules in the program 5. Screenshots 6. Individual Contribution 7. Scope for future work 8. Conclusion 9. References 2

Acknowledgment We would like to thank Prof Chandrashekar Ramanathan for his guidance and useful insights during the project development. We would also like to thank our alma mater IIITB and also IBM for offering this course and providing us opportunity to work on this project. 3

1. Introduction 1.1 Project Objective This project is aimed at develop a product, Ad-hoc query builder which is user friendly tool to build and execute SQL queries on Oracle database. All the inputs are taken from user through a GUI and query is constructed on the fly. Reports are generated and displayed to the user. 1.2 Ad-hoc Query Ad hoc querying is a term in information science. Many application software systems have an underlying database which can be accessed by only a limited number of queries and reports. Typically these are available via some sort of menu, and will have been carefully designed, pre-programmed and optimized for performance by expert programmers. By contrast, "ad hoc" reporting systems allow the users themselves to create specific, customized queries. Typically this would be via a user-friendly GUI-based system without the need for the in-depth knowledge of SQL, or database schema that a programmer would have. Because such reporting has the potential to severely degrade the performance of a live system. Ad hoc querying/reporting is a business intelligence subtopic, along with OLAP, data warehousing, data mining and other tools. [1]. 2. Tools/Software used The ad-hoc query builder is designed for oracle database. Hence the back-end is Oracle 10g. The front-end is built using JSP and JavaScript and the interaction with the back end is through Servlet and POJO (Plain Old Java Objects). The IDE used to build this software is Net Beans 6.8 with Glass-Fish server. The operating system using which this product is developed is Ubuntu 10.04. 3. Architectural and component-level design A description of the program architecture is presented. [2] 3.1 Program Structure 3.1.1 Architecture diagram A 4 tier architecture is used Logical building blocks of the application 4

Fig 1: 4 tier architecture diagram A pictorial representation of the architecture used is presented. Fig 2: Architecture 5

3.1.2 Why n-tier architecture was chosen? Each layer can be developed independently of the other provided that it adheres to the standards and communicates with the other layers as per the specifications. Each layer can potentially treat the other layers as black-box. In other words, each layer does not care how the other layer processes the data as long as it sends the right data in a correct format. The n-tier Applications provide specific advantages that are vital to the business continuity of the enterprise. Typical features of a real life n-tier includes the following: 1) Security: Application has appropriate authentication, logging and monitoring mechanisms. 2) Availability and Scalability: Application should be reliable and should have sufficient fail-over mechanisms (redundancy) such as fail-over clusters. 3) Manageability: Application should be designed to have the capability to deploy, monitor and troubleshoot. Methodology to handle errors, log errors and provide useful information for problem resolution. 4) Easy Maintenance: This is generally achieved by adopting coding standards, deployment standards, modular application design, data abstraction and application frameworks. 5) Data Abstraction: Easily make changes to the functionality, business rules with the least amount of impact to the entire applications These features facilitate a successful n-tier application that intends to provide a good solution. 4-tier architecture is used because it best suits the project. Why not event driven, front-end back-end or monolithic architectures? Event driven architecture are best-suited for embedded systems while the other architectures are suited for stand-alone applications. 3.2 Description of the layers 3.2.1 Layer n Process Specification Client layer: The client layer consists of the Web browser which supports all the features of a typical day-to-day browser. It takes care of the interaction between the user and the application through web pages and HTTP. The server used in this case is Glass Fish server which comes integrated with NetBeans 6.8. Presentation layer: This layer deals with the general layout of the web page as seen by the user. It consists of form-based components like list boxes, text area, buttons and other form-based components of HTML. Business logic layer: 6

This layer takes care of all the business functions and information exchange between the database and presentation layer. It consists of logic to establish connection with the Oracle 10G database and run SQL query or stored procedure. Database layer: The database used here is Oracle 10G. It takes care of the persistence storage of objects. Further this work uses a stored procedure which takes care of all the logic to construct a SQL query given the proper inputs from the GUI. 3.2.2 Layer n interface description Client layer (Browser): All the input and output interfaces of this layer are designed in a way, a web browser can understand. The protocol used is HTTP. A web browser enables the user to interact in a GUI-based environment rather than a character-based environment. Presentation layer: The input and output to this layer is received and sent from/to the client layer. Whatever the user enters in the web page, say a form filled and button clicked triggers a piece of code to be executed, that interacts with the database. Typical code consists of JSP and Servlet. The presentation layer may also send inputs received from the client as parameters to a piece of code in the business logic layer. Business logic layer: The input and output to this layer is tied to the Presentation layer. This layer gets input from the presentation layer as parameters and executes code written as, say, a Java Bean. A Java Bean is a POJO (Plain Old Java Object) which can be called from the Presentation layer and returns a value say an Array List which can be used in the Presentation layer. This layer also takes care of the establishment of connections with the Oracle database and executing an SQL query or Oracle Stored Procedure Database layer: The database used is Oracle 10G which contains the entities and the attributes. It also contains the Oracle stored procedure which consists of the main logic of constructing the query. 1. Designing the GUI: 4. Modules in the program This module involves the use of JSP, JavaScript and Cascaded style sheets. The program consists of two jsp files index.jsp and query.jsp which consists of various components like list box, text Area and buttons. The list boxes have to be designed in a way that when one item is selected and a button is 7

pressed, the selected item should go to another list box. The page must be designed such that different forms are submitted using the post method when different buttons are clicked. The buttons are connected to respective JavaScript functions by the attribute onclick. They do the required functions on click of these buttons. 2. Coding of Servlets which are called from the GUI on submitting the form: Servlets are invoked when a form is submitted using the post method. The Servlet reads the values entered in the various fields and invokes the corresponding Plain Old Java Object by passing these fields as parameters. This Java Object may in turn execute an SQL query or Called Procedure which returns the ArrayList of results and redirects the session to another jsp file. In the case of executing the final query string, the Servlet returns the value as an ArrayList of HashMaps as discussed in the next point and the table is displayed by traversing the ArrayList where each element is a HashMap of columns. 3. Coding of JavaBeans which in turn call Plain Old Java Objects that return values to the GUI: In this work, there are Java codes in the jsp file which invoke a JavaBeans that may return values to the GUI and the code is embedded within <% %>. While executing queries with output as single column the Java Object returns the result as ArrayList of Strings. In the case of executing the final query, the output may contain many columns that are returned as ResultSets. This ResultSet is converted to an ArrayList of HashMaps where each element of the ArrayList is a single row of the output and the HashMap is a <key, value> pair where the attribute (column) name is the key and the value is the content of that attribute name corresponding to that row. 4. Coding of the stored procedure which constructs the query in Oracle 10g : Stored procedures in oracle are written in PL/SQL. These procedures take input from plain old java object which is in turn called by servlet. The stored procedures are the ones which generate required SQL query string. In procedures, logic is written to separate and store input into list. First all the required tables are fetched and stored in a variable. To fetch all tables used, attributes selected and condition given is used (i.e) all tables to which these attributes and condition fields belong to are fetched. Using topological sort a path to connect tables is established where primary key, foreign key relationship tables are joined if a path exists between them. This is stored in a string variable. All the generated variables are used to generate the query in proper SQL format. If any variable could not be fetched or if path does is not present, then an error status message is generated. If no errors are present then the generated SQL query is returned, else error message is returned. 8

5. Screenshots 1. The attributes to be displayed to the user is given in a list and user selects the required attributes. The screen for selecting attributes: 2. After selecting required attributes: 9

3. After selecting required attributes, save button is clicked to save those attributes and next button to take to next page. In the next page other inputs as to how to order the output values, join condition of tables and the condition on which to fetch the attributes is present. The screen of next page 4. After selecting required inputs, the screen would be: 10

5. After selecting all required inputs, save button has to be clicked to generate the SQL query. The screenshot of SQL generated query is: 6. Now the ad hoc query is generated. The query has to be run on Oracle to get the required output. On click of Run button, the query is run and output is generated. The output is displayed in the next page. The screenshot of the output is: 11

6. Individual Contribution Rashmi: Module 1 Designing the GUI Niranjani:Module 2 Coding of Servlets which are called from the GUI on submitting the form: Bratati: Module 3 Coding of JavaBeans which in turn call Plain Old Java Objects that return values to the GUI. Prof.Chandrashekhar Ramanathan:Module 4 Coding of the stored procedure which constructs the query in Oracle 10G : 7. Future scope of work The current running version of the product does not support a complete abstraction of the database entities. In the running product we still have to supply properly structured SQL code for the where clause which requires the entity names present in the database.the future work which can be done to enhance this project are: 1.One more abstraction level can be added which will construct structured SQL where-clauses from userfriendly where-clauses. 2. The product can be developed for mysql and other existing databases and can be customised for the clients based on their respective business needs. 3. In addition to this the product can be enabled to support construction of more complex queries. 4. Lastly the product should include of saving the document on the hard disk and also export them to other document formats like.doc or pdf. 8. Conclusion Ad Hoc Query tool is an user friendly tool which can be used to build SQL queries and run them. This project has given us exposure to oracle procedures, and web service applications. We learnt how 4 tier architecture implementation abstracts the layers from each others. Overall this project has been an eye opener towards Product Development. 9. References [1] http://en.wikipedia.org/wiki/ad_hoc_query [2] Sofware Design Specification submitted as part of Project Family-A in the course work Data Modeling by Ramachandra Kousik A.S, Amit Jain, Avinash Mehta, Bodhisatta Barman Roy and Niranjani S. 12