+ All Categories
Home > Documents > Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open...

Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open...

Date post: 21-Jul-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
35
Special Interest Activity Paper By: Vipul Narain
Transcript
Page 1: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

Special Interest Activity PaperBy: Vipul Narain

Page 2: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

Contents

Objective..............................................................................................................3Introduction to Eclipse and Plug-in...................................................................3Tasks Planned.....................................................................................................3Steps – Integrate plug-in in Eclipse workbench...............................................6Steps – SQL Edge...............................................................................................9Steps – Quantum DB.........................................................................................19Features of Eclipse...........................................................................................28Features of SQL Edge.......................................................................................29Features of Quantum DB..................................................................................30Feature Comparison between SQL Edge and Quantum................................31Conclusion.........................................................................................................31

Page 3: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

Objective

The focus of this study is to compare couple of database plug-ins integrated eclipse IDE and analyze their functionality in terms of the functionality offered to end users in terms of carrying day to day database tasks. These include but are not limited to DDL, DML and data modeling. We are using Postgres 8.2 as a back-end database for the purpose of this activity.

Introduction to Eclipse and Plug-in

Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight other companies in November of ‘2001. Eclipse is used for building applications in Java, J2EE, C, C++, HTML and so on. Entire development team could use one platform where all their tools integrate and work together. Concurrent Version Systems (CVS) allows the control for source code and documentation. Eclipse recognizes the association of file to word processor. Additional repositories could also integrate alongside the CVS.

Eclipse allows extending itself by enhanced functionality. The central mechanism of defining this new functionality is called plug-in. The Eclipse architecture does not define the maximum and minimum size of plug-in. Diagram below refers to the Eclipse Central from were the plug-ins have been selected:

Tasks Planned

1. Download the Postgres SQL database Enterprise Edition 8.22. Download Eclipse Plug-ins from Eclipse Plug-in Central page on www.eclipse.org3. Create separate database for respective plug-ins4. Integrate the plug-ins with Eclipse Workbench

Page 4: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

5. Trying different database tasks like data modeling, creating tables, views, stored procedures, querying etc using these plug-ins

6. Compare the functionality provided in terms of ease of use, features offered and tabulate the functionality in tabular forms.

7. Rate the plug-ins based on the features offered8. We have chosen a class diagram based on an outbound shipment for our purposes. Here

is the display of the business functionality which we want to use plug-ins to model the data:

In this business model, a large enterprise has a central warehousing hub from were shipments are consolidated and shipped using freight forwarders or shippers to various customers. The shipment mode could either be Air, Land or Sea. The shipments are consolidated in HAWB (House Air Way Bill). For Sea and Air shipment mode, these are further consolidated in MAWB (Master Air Way Bill). This is also known, as “Bill of Lading” for sea shipments.

Here is a high level Class diagram for our proposed study:

Page 5: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

We have chosen couple of plug-ins – SQL Edge and Quantum DB. Below is the description of various tasks we could accomplish from each of this plug-ins. We will first test SQL Edge.

Page 6: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

Steps – Integrate plug-in in Eclipse workbench

To install a new plug-in, refer to screen shots below. The first step is on menu bar go to Help -> Software Updates -> Find and Install

In new pop-up window check the radio button – Search for new features to install and click “Next”. Refer to screenshot below:

Page 7: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

In our case we are installing a plug-in from external site, click “New Remote Site” button. Refer to screenshot below:

The new pop-up window has two fields – Name and URL. In name enter Quantum and in URL field enter the value of URL for update site (For Quantum DB this is - http://quantum.sourceforge.net/update-site. Refer to the screen shot below:

This will start searching for the site and downloading the plug-in. Refer to next two screenshots:

Page 8: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

Once the download is complete, we can find the Quantum DB in windows -> Open Perspective-> Others and select it to open the perspective. Refer to next screenshot:

Page 9: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

On clicking other, new pop-up has all the perspectives listed where we find the new plug-in Quantum DB added. Refer to screen shot below:

Steps – SQL Edge

1. Create a connection to existing database. On menu bar click on settings -> JDBC Provider ->Add

Page 10: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

In the new pop-up men, enter a connection name and select Driver type from the drop down. In our case this is postgres SQL and click OK. From the browse select the driver file using the path were it is located.

Page 11: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

Go to Menu-> Settings-> Define Database Connection Information. This will bring a pop-up box. To add a new database click -> Add. In new pop-up box enter a descriptive name for database. Here we enter shipdb and click Next.

Choose the JDBC provider created from the settings in the previous step. Refer to next screen shot and click “Next”:

Page 12: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

Click Next. Click close after selecting the database from the next. Here the database is added to the workspace. Refer to next screenshot:

Page 13: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

We find the DB explorer has the database added. We can expand respective nodes. Next we will explore how we can perform database tasks using this database added. Go to Windows and select the schema perspective.

Select Schema perspective from window in the menu bar

Right click on tables and click new on the context to create a new table

Page 14: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

Here is the completed table

Once we have created all the tables as defined in our ER model, we can use SQL edge to generate an ER diagram. Here is the first step – go to windows and change to model perspective:

Page 15: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

Once we select the model perspective, we could go ahead and create the E-R Model. Right click and then select – “Add Table”. Refer to screen shot below:

On clicking, next, we can get the table listings in next pop-up and upon selecting tables we get the E-R diagram as shown in next screen shot:

Page 16: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

Here is the ERD schema documented from this:

Next we go to windows and change perspective query perspective. Here we can run the SQL commands like delete, update, insert and select. We can type in the SQL we want to execute and the SQL text could also be saved in to files. The next screen shot refers to the selection against part table:

Page 17: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

Here is a screen shot for insert statement:

Here is an update statement executed against part table:

Page 18: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

The plug-in allows to get explain on query. This could be used for query optimization. For using this feature click on windows on menu bar and select the explain perspective. Here is the screen shot:

Page 19: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

Steps – Quantum DB

In this section, we will explore the features of plug-in Quantum DB. Here is the first screen shot which shows Quantum DB perspective. We will be performing the Database DDL, DML tasks and explore the features available with this plug-in. Refer to screen shot below:

Right click in Database Bookmark view and click on “New Bookmark” from the context. Refer to screen shot below:

Page 20: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

From the pop-up for JDBC Driver, click the “Add Driver” button. Refer to screenshot below:

Refer to next screen shot for adding the external jar file for JDBC Driver and Driver class. Click Finish. Refer to screen shot below:

Once the Driver has been added, select the newly added Driver and then click “Next”. Refer to screen shot below:

Page 21: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

This will bring a new screen for connection details. Enter relevant user id – owner of the database and password. Enter database name. Once all values are entered click “Next”. Refer to screen shot below:

This will bring us screen were we can enter the name for new bookmark. In our case we have chosen it to be ITK478. Once the name is entered, click “Finish”. Refer to the next three screen shots:

Page 22: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight
Page 23: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

Here we see the “ITK478” bookmark is created in the “Database Bookmarks” pane. Right click the bookmark and select the “Connect” from the context. Refer to screen shot below:

Once a connection has been established – the database objects are visible in the workbench in the “Database Bookmarks” pane. Refer to screen shot below:

Page 24: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

Next we can expand the nodes. Click on “+” symbol on the left side. We can expand nodes to any level. Here we have chosen to expand the node public and then table node. Refer to the screen shot with nodes expanded below:

Not able to locate a wizard for creating the tables. So here we are using the “Quantum Queries View” pane. Refer to next screen shot for how we can achieve it:

Page 25: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

The quantum SQL log gives a message that the table has been successfully created. We will use this to create all the tables, which were created in shipdb using the plug-in SQL Edge. By using this technique we now have same tables, which we had in shipdb in shipapptestdb. Refer to screen shot below with table node expanded:

Next we will run the SQL commands like Insert, Delete, select and update and compare with the plug-in SQL Edge. Refer to various screen shots with these DML:

Page 26: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight
Page 27: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

To export a table structure in XML, select the table; right click to get in the context select Structure -> Write to file. Refer to the following screen shots:

Page 28: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

Features of Eclipse

A brief introduction of Eclipse has been given in our starting section. Here we will highlight some of the key features of Eclipse workbench. The three main components of Eclipse workbench are – Editors, views and perspectives. Eclipse workbench is divided in several panes, which is focused on resources – project, folders and files.

Editors allow modifying specific resources. The panes surrounding editors support active editing. A view allows navigation through various resources in Eclipse. These could also be used for changing resources like modifying resource names. Unlike editors modifications in view show up immediately. Editor requires saving the changes.

A perspective in Eclipse defines a set of editors and views arranged in an initial layout to accomplish a specific task or role. Here is the list of various perspectives supported in Eclipse:

1. Java2. Java Browsing3. Java EE (default)4. Resource5. Debug6. Java Type Hierarchy7. Planning8. Team Synchronizing9. JPA Development10. Plug-in Development11. Database Debug12. Database Development13. CVS Repository Exploring

Additionally users can define their own perspectives. An external plug-in add a new perspective. Here is screen shot of available perspectives in our workbench:

Page 29: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

Features of SQL Edge

SQL Edge provides following perspectives:

1. Query perspective - Query perspective is the default perspective that is displayed when SQL Edge® first started. It has a “Database Explorer”, any number of SQL editor windows, and “Query Result” views

2. Schema Perspective - Schema perspective allows users to browse the database schema information, and also provides a set of wizards to create tables, views, synonyms and sequences.

3. Relationship Perspective - Relationship table view displays related data in master-detail style.

4. Model Perspective - Model perspective displays tables and their relationships in an entity relationship diagram.

5. Execution Plan Perspective - Execution plan perspective allows users to show the execution plan of a query.

Relationship perspective has basically two views – Table and Tree view to display the master-detail relationship.

In terms of functionality – SQL Edge allows connection to any JDBC compliant database. It allows us to create all database objects that include tables, views, sequences and synonyms. A wizard is available to navigate through all these objects. This is accomplished using the Schema perspective provided by the SQL Edge. Note that no wizard is provided for creating a stored procedure.

Query perspective allows DDL and DML statements that include creating and dropping tables, views, stored procedures etc and executing SQL statements like select, update, insert, delete on different tables. Query perspective also supports a “Create Query Selection” wizard. This allows singleton query to be build. This feature does not support multiple tables. This is the

Page 30: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

default perspective. Relationship perspective allows the master details to be displayed in either table or tree view.

Model perspective allows creating an Entity Relationship diagram and defining master-detail relationships between various tables. This view allows selecting tables already created for the E-R diagram. The foreign constraint links are automatically established but the master-detail relationship needs to be defined. This feature does not allow cardinality between entities to be defined. It also does not allow an E-R model be created without the physical existence of a table.

The Execution Plan perspective is the best feature of SQL Edge. This displays an execution plan of a query. However this feature is limited to Oracle and Postgres SQL only at present. However other databases supporting “explain” command can use Query perspective.

All SQL Edge perspectives share the Database Explorer view (left hand pane). This displays all existing database objects as tree. Different nodes can be traversed. The explorer allows multi-platform as well as multiple databases to be listed. The nodes of these can be expanded to get in an appropriate object.

Features of Quantum DB

SQL Query editor view allows all DDL and DML statements supported by the database. No SQL wizard is available in the Quantum DB. The query could be imported from a file and run.

Quantum DB enables you to export the structure and the data from a database in different formats. This also allows E-R diagram with .erd extension to be edited. There does appear any wizard support in this plug-in. This plug-in also allows for multiple database connections. This is a relatively simple plug-in but an open source one and could be used for the developer tasks in an Eclipse workbench. Quantum Db allows exporting the table structure in an XML file. Here is the result of one of the table exported to XML File:

<?xml version="1.0" ?><Metadata>

<Author>Quantum</Author><Version>1.2</Version><table bookmark="ITK478" database="Postgres" isSynonym="false" name="awb_det"

schema="public"><column java.sql.Types="12" keyOrder="1" name="awb" nullable="false"

position="1" primaryKey="true" size="10" type="varchar" /><column java.sql.Types="12" keyOrder="2" name="part_id" nullable="false"

position="2" primaryKey="true" size="10" type="varchar" /><column java.sql.Types="4" keyOrder="0" name="awb_qty" nullable="false"

position="3" primaryKey="false" size="10" type="int4" /><foreignKey foreignSchema="public" foreignTable="awb_det"

localSchema="public" localTable="awb_m" name="awb_det_fk1" onDelete="noAction" onUpdate="noAction" type="imported">

<joinedColumn foreign="awb" local="awb" position="1" /></foreignKey><foreignKey foreignSchema="public" foreignTable="awb_det"

localSchema="public" localTable="part" name="awb_det_fk2" onDelete="noAction" onUpdate="noAction" type="imported">

<joinedColumn foreign="part_id" local="part_id" position="1" /></foreignKey>

</table></Metadata>

Page 31: Illinois State University€¦  · Web viewIntroduction to Eclipse and Plug-in. Eclipse is an open source tool integration platform developed in a joint initiative by IBM and eight

Feature Comparison between SQL Edge and Quantum

S. Number Feature Description SQL Edge Quantum1. Connections to multi platform Supported Supported2. Connections to multiple

databaseSupported for all JDBC Compliant databases

Supported for all JDBC Compliant databases

3. Query Wizard Supported for singleton query. Multiple table joins are only supported through typing query in SQL Editor.

Not Supported

4. Create Table Wizard Supported Not Supported5. Create View Wizard Supported Not Supported6. Create Stored Procedure Supported Not Supported7. SQL Editor Supported Supported8. Query Execution Plan Supported only for

Oracle and Postgres SQL

Not Supported

9. E-R Editor Supported – Allows to create E-R diagram for selection of tables already created. Inverse of creating an E-R diagram and then creating entity is not supported.

Supported – allows only edits on file with .erd extension.

10. Object Relational Databases Not Supported Not Supported11. Export table Structure to XML Not Supported Supported12. XML Databases Not Supported Not Supported

Conclusion

SQL Edge has many more features compared to Quantum. Quantum requires every DML/ DDL to be written in the editor and then executed unlike SQL Edge that has wizard supports. SQL Edge also has an advantage of supporting the “Explain” feature for Oracle and Postgres SQL. Other database supporting the “Explain” feature could leverage the Query Editor for explain. All other DML – select, insert, delete, update are supported in both of the plug-ins. SQL Edge has an advantage of wizard for singleton query. In overall analysis, SQL Edge scores over Quantum in most of the features.


Recommended