I used to design a database of a pair of tables in the database to convert the table to JavaBean, and also a slow to play the efficiency is really low, or the teacher is more intelligent learning.
The database visualizer I used was Navicat Premium, UltraEdit (formerly used by notepad++, found to be useful with this tool).
Mysql My database is db_training, which represents tb_patent.
What is the INFORMATION_SCHEMA database?
The "INFORMATION_SCHEMA database" is a MySQL-band that provides a way to access database metadata. What is meta data? Metadata is data about the data, such as the database name or table name, the data type of the column, or access permissions.
SELECT column_name FROM information_schema.`COLUMNS` WHERE TABLE_SCHEMA=‘db_training‘and TABLE_NAME=‘tb_patent‘
Table_schema the database name to check
TABLE_NAME the tables in the database to be checked.
Copy column_name to UltraEdit inside
Click on column mode and enter private String first
Ctrl+r change line character to; add newline character
Is the last one not; However, the JavaBean attribute naming format is best used with the hump naming method.
How to get table properties quickly from a database write JavaBean