站内搜索: 请输入搜索关键词

当前页面: 开发资料首页Netbeans 专题How to Start with the Database Explorer

How to Start with the Database Explorer

摘要: This document briefly describes how to start to working with the Database Explorer

What is the Database Explorer?

The Database Explorer is a simple database administration tool. It allows you to make connections to database servers, view and change the database schema and view the data in your tables and views. It also allows to execute arbitrary SQL statements against a database.

How is the Database Explorer presented in NetBeans?

The starting point to using the Database Explorer module is the Databases node on the Runtime tab of the Explorer window.

How do you connect to a database?

Within the Databases node is the Drivers node, which contains the JDBC drivers that NetBeans know about. To install a new driver, right-click the Drivers node and select Add Driver to open the Add JDBC driver dialog. Fill in the required data (especially the driver class and JAR files) and click OK. A node for the new driver will be created under the Drivers node. Right-click this node and select the Connect Using command and enter the required connection information (database URL, username, password). If everything is correct, the database connection will be established.

How to work with a database schema?

Information about the database schema is presented by the nodes under the connection node. You can see the tables with their columns, indexes and foreign keys. You can also see views and their columns and stored procedures with their arguments. More information about each database element is possible to find in the Properties window (e.g. data type, size, etc. for columns). Using the popup menus, it is possible to access commands specific to database elements, such as to create a new table, add a column to an existing table, or view data.

Additional Documentation

More detailed documentation is available in the module help. The help is accessible from the NetBeans main window. Choose Help > Help Contents and navigate to Servers and Databases > Working with Databases.


↑返回目录
前一篇: How to open any document type from NetBeans
后一篇: How to Work with Excel Files Using NetBeans