Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

IntelliJ IDEA built-in database management tools

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

1. Write at the front

Development of Java applications, as a star tool IntelliJ IDEA Ultimate is of course the first choice, and then database SQL development, often choose such as: Navicat, sqlyog, MySQL Workbench. When Java database programming, will come in two tools, extremely inefficient, in fact, this is not necessary. IDEA itself is an artifact, and you can complete Java numbering and SQL development at the same time in one tool. This paper mainly introduces the basic use of database tool (DataBase Tool) under IDEA.

two。 Tabs

Anyone who has used IDEA knows that this is an extremely powerful, smart, and comfortable integrated development tool. There are a large number of functional tabs, and the following figure shows the location of tabs about database tools before using them.

Show feature Tab

Buttons on the feature tab

3. Configure connection

Most of the mainstream database management systems supported by database tools, when we use them, we only need to select the specified database and create a data source.

In IDEA, the tool mainly uses the way of connecting to the database: JDBC, which is equivalent to accessing the database through the client.

Then the basic conditions for accessing the database are as follows:

Database server address database server port (usually mainstream relational databases have a default port) connected to the database (optional, need to be clearly specified in this tool) username password JDBC driver (optional, connect to the database through the Java program)

Here is a case study to demonstrate how to connect to a MySQL database in a database tool

Step 1: add configuration, select data source, select MySQL

Step 2: fill in the configuration information

With regard to the configuration information, there is something that can be filled in here. This article will only talk about the simplest configuration.

Here is a brief description of other configurations:

Tx: transaction configuration. By default, auto means to automatically commit transactions, and you can choose manual manual mode. Read-Only read-only mode means that the link configuration can only read data and cannot be changed. Auto-sync automatically synchronizes objects in the database shown in the tool.

Select multiple Schema (databases) to display in the database tool

Step 3: apply configuration

The figure above shows the basic working area of the database tool, as well as the function buttons.

4. The tool uses 4. 1 to write SQL

You can complete the operation of the database by writing all kinds of SQL statements in the SQL editing area. Database tools here have particularly friendly keywords, object information to provide functions.

4.2 Visualization Operation

In addition to executing SQL through the SQL command, the most powerful part of the database tool here also provides visual manipulation. For example: create tables, modify tables, view table data, view field information, etc.

First: create tables

Second: modify the table

Note: the operation of modifying a table is basically similar to that of creating a table, except that you can also modify the table name information.

Third: view data and updates

IDEA built-in database tools are still very powerful, this article as a guide, with multiple features need to be constantly experienced and discovered.

5. Matters needing attention

Here are some considerations for using the tool:

The IDEA tool needs to be a flagship version of IntelliJ IDEA Ultimate. The community version does not support the first configuration of a connection to a specific database (such as MySQL). You need to download the JDBC driver, and IDEA will download it automatically (you need to network). Of course, you can customize the JDBC driver and set it in the interface for configuring the connection:

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 287

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report