当前页面: 开发资料首页 → Netbeans 专题 → How to Start with the Database Explorer
摘要: This document briefly describes how to start to working with 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.
The starting point to using the Database Explorer module is the Databases node on the Runtime tab of the Explorer window.
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.
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.
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.