- Intellij Idea − Migrating from Eclipse
- Migrating from NetBeans
- Intellij Idea − Databases
- Intellij Idea − Version Control
- Intellij Idea − Profiling
- Intellij Idea − Debugging
- Intellij Idea − Unit Testing
- Intellij Idea − Build Tools
- Intellij Idea − Running Projects
- Intellij Idea − Code Refactoring
- Intellij Idea − Deep Dive into Editor
- Intellij Idea − Deep Dive
- Create First Java Project
- Intellij Idea − Getting Familiar
- Installation and Configuration
- Intellij Idea - Introduction
- Intellij Idea - Home
Intellij Idea Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Intelpj Idea - Databases
IntelpJ provides database tool which allows you to perform database related operation from the IDE itself. It supports all major databases pke MySQL, Oracle, Postgress, SQL server and many more. In this chapter, we will discuss how IntelpJ supports MySQL database.
We assume that the reader is famipar with the database concepts and the required databases’ tools are installed and configured on your system.
Create Database
To begin with, we will create a database - test_db. Execute the following command in the command prompt −
Connect to Database
Follow these steps to connect to a Database −
Navigate to View → Tool Windows → Database.
Cpck on the green plus icon and select Data Source → MySQL.
Enter the host address and cpck on the Test Connection button.
If everything goes well then it’ll show Successful as shown in above image.
Cpck on OK button to save connection.
Create table
Follow these steps to create a new table −
Right-cpck on the database pane and select schema.
Select the New → Table option
A new window will appear. Define the table with columns, types and so on.
Cpck on the Execute button
Cpck on the Execute button
Insert Data
Follow these steps to insert data −
Select table from the database pane.
It will open table in the new window.
Cpck on the plus icon to insert new row.
Cpck on the Submit button to make the changes permanent.
Retrieve Data
To retrieve data, double-cpck on student_table from the database pane. It will show table data in new window.
To ensure that the data is inserted into the table, open the command prompt and execute the following commands −
Advertisements