MyEclipse Database Tutorial: MyEclipse Database Tools

Source: Internet
Author: User
Tags sybase

1. Database Tools for enterprise Applications

When developing Java enterprise applications, it is often necessary to store and retrieve data from applications and enterprise databases. The rich database and persistence features in MyEclipse can help you quickly develop applications under the database-centric Java Ee/jee, Spring, Hibernate, pojos platforms, or combine thereof.the The MyEclipse database's resource Manager provides direct access to your enterprise data store and offers functionality:

    • JDBC Connection template for all popular relational databases
    • SQL Editor code completion and query execution
    • erd viewer
    • enhanced db editing function
      • oracle
      • Microsoft SQL Server and Sybase
      • mysql
    • Explore the data structure of the database browser, For example, table, column, sequence
    • view table and JDBC Connection details
    • manually edit data in tables
    • DDL export
    • Integrated Derby database and JDBC driver test
    • export table defined as a Java or mapped hibernate project

Any application that uses a database requires some kind of persistence layer. MyEclipse persistence supports the creation or generation of a spring framework that uses JPA or mappings, Hibernate or maps, or uses or does not use EJBS.

2. Resource Manager view of the MyEclipse database

The resource manager perspective of the database describes the best layout for browsing and editing the database as a central task. Open this view and choose Window>open perspective>myeclipse Database Explorer from the menu.

MyEclipse's Database Explorer perspective3. Handling Drivers

You can connect to the database to create a new myeclipse JDBC driver, and the MyEclipse Database Explorer supports a variety of database servers, such as:

    • axion
    • hypersonic DB
    • instantdb
    • interclient
    • firebird
    • odbc Bridge
    • jtds
    • mckoi
    • microsoft SQL Server
    • mimer SQL
    • mysql
    • oracle
    • pointbase
    • postgresql
    • sapdb
    • sunopsis XML
    • sybase
    • thinksql

Add a new driver and view it using the DB browser in the context menu.

Create a new driver

Using the Database Driver Wizard, you can quickly set up drivers to use pre-installed driver templates. Use the test driver button to ensure that the information provided is correct.

Database Driver Wizard

In your database you can choose to view all or only select several of these product catalogs/schemas.

Selection mode

Use the Export and Import Wizard to share the definition of a drive between your workspace and your computer.

Exporting drivers for MyEclipse

The MyEclipse driver can be imported from a previously exported file or an existing workspace.

Importing drivers for MyEclipse4. Database Explorer views and wizards

The database browser view can be started from the main view of the DB task, and the drivers for all connected database entities are displayed in the views.

DB Browser view available table actions

Use the Table Wizard to create a new table in the selected directory/schema.

New Table Wizard New Column Wizard

Use the Foreign Key Wizard to create a new foreign key between the selected tables.

New Foreign Key Wizard

Use the Index Wizard to create a new metric for the columns of a selected table.

The New Index Wizard

The Database connection Information view displays the database connection properties for the selected driver.

DB connection Information view

The table/object Information view contains all the information displayed for the selected database entity structure.

Table/Object Information view

Using the edit data operation brings up a table that edits the table view selection. Where text data is edited, you can add or remove rows from the table in the Edit table view.

Edit Table View5. Using SQL

Open the SQL Editor connection in the database browser by right-clicking and select the new SQL Editor from the menu. or double-click an SQL or DDL file.

Open a SQL Editor

The SQL Editor provides content assistance based on the selected connection, and you can enter multiple queries in the editor and execute them successively.

SQL Editor Column content auxiliary SQL Editor General content assistance

The results are displayed in the SQL Results view, and the rows can be configured to increase.

The first 100 results are displayed in the SQL results view

Queries that are executed in the current session are recorded in the SQL History view.

SQL History View

To generate the DDL as an existing database entity, right-click the entity and select Generate>ddl from the menu.

DDL generated by generating DDL operations6. Entity Relationship Design

The MyEclipse Er-designer tool enables you to visually manage and design a relational database through implementation and maintenance, MyEclipse Er-designer also provides a visual model of the existing database. Because it reverses the entity relationship (ER) model of the database, Er-designer accesses the database's metadata using database connections from the database resource Manager.

The New ERD Wizard

Tables can be added to an existing diagram by dragging and dropping from the database browser.

ER diagram7. Extending the capabilities of Oracle,mysql,sql server and Sybase

MyEclipse version Professional users can access support based on the above feature extensions to the database. CRUD operations through the Database browser view (if applicable) of packages, processes, functions, sequences, triggers, etc. For example, a list of supported Oracle entities can be seen below.

DB Browser View connected to Oracle database running Oracle Process

For more support for extended details, see the following overview document: Oracle Features in Myeclipsemysql Features in Myeclipsems SQL Server & Sybase Features in Myeclips E

8. FAQs

Does MyEclipse support Oracle,ms SQL server,postgresql,hypersonicsql and other DBMS?

Yes, the database functionality in MyEclipse is built on the JDBC standard. This means that any MyEclipse database with a high-quality JDBC driver can be very useful.

The Database Explorer I'm using is more difficult and unstable.

Almost every time you get a report of database functionality problems that occur in Database Explorer, due to old or bad JDBC drivers (such as Oracle Legacy Classes12.zip drivers). Typically, your driver switches to another high-version driver to troubleshoot problems.

You cannot create a foreign key in MySQL as in the tutorial. Why is it?

You need to make sure that you are using the InnoDB database type or other database type that supports foreign keys in MySQL. The older default MyISAM table type does not support foreign keys.

How can I fine-tune the result set or the appearance of my ER diagram?

All of these settings can be implemented by selecting Window> Preferences from the menu, extending MyEclipse, and selecting Database Explorer.

MyEclipse official Chinese online line, welcome to download Communication!

MyEclipse Database Tutorial: MyEclipse Database Tools

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.