DEVGRIZZLY / DB DEVELOPER TOOLS

DB Developer Tools user guide

This Google Sheets add-on by DevGrizzly generates SQL such as INSERT from data tables, and DDL, Java VO, and MyBatis code from table-definition sheets.

DATA MODE · records → SQL SCHEMA MODE · definition → development code

01 / OPEN

Open the tool in Google Sheets

  1. 1

    Open or refresh a spreadsheet while signed in to the Google account that installed DB Developer Tools.

  2. 2

    From the top menu, choose “DB Developer Tools → Open tools.” In a Korean spreadsheet, the menu appears as “DB 개발자 도구 → 도구 열기.”

  3. 3

    In the right sidebar, choose the language, mode (DATA or SCHEMA), DBMS, and operation.

  4. 4

    Whenever you change the selected cells, click “Refresh range” and confirm the range summary at the top of the sidebar.

DATA

Turn records into SQL

The first row contains column headers and following rows contain values. Supports INSERT, UPDATE, DELETE, MERGE/UPSERT, SELECT, IN CONDITION, and column conversion.

SCHEMA

Turn a definition into code

The first row contains schema headers such as COLUMN_NAME and DATA_TYPE; following rows define columns. Supports DDL, Java DTO/VO, MyBatis, and SQL CRUD.

02 / DATA MODE

INSERT example

DATA mode reads the visible table and converts each value to a DBMS-aware SQL literal. Quotes are escaped, blank cells become NULL, and native Sheets date cells become database-appropriate date expressions.

1. Prepare the sheet like this

USER_IDUSER_NMAGEACTIVE_YN
U001Jane Kim30Y
U002Hong Gil-dong(blank)N
1

Enter column names in the first row

Every header cell must be filled, and column names must be unique.

2

Enter records from the second row

Use native number and date cells in Sheets when possible. Blank cells are handled as NULL.

3

Select the headers and data together

For this example, select A1:D3. After changing the selection, click “Refresh range” in the sidebar.

2. Choose these sidebar options

Mode
DATA
DBMS
PostgreSQL
Operation
INSERT
Table name
TB_USER
INSERT style
Multi-row
Include NULL columns
On

3. Review and copy the result

PostgreSQL · INSERT
INSERT INTO TB_USER (
    USER_ID,
    USER_NM,
    AGE,
    ACTIVE_YN
) VALUES
    ('U001', 'Jane Kim', 30, 'Y'),
    ('U002', 'Hong Gil-dong', NULL, 'N');
Other options

“One row per statement” creates one INSERT for each record. Turning off “Include NULL columns” omits blank columns from that row. Oracle multi-row output uses INSERT ALL.

03 / SCHEMA MODE

DDL example

SCHEMA mode reads column definitions rather than records. It recognizes each attribute from the first-row headers, so the canonical layout below is the most reliable.

Supported schema headers

COLUMN_NAMERequired

Database column name, for example USER_ID.

DATA_TYPERequired

Database type, for example VARCHAR, NUMBER(20,5), or TIMESTAMP.

LENGTHOptional

Character or binary length, for example 100.

PRECISIONOptional

Total number of numeric digits, for example 20.

SCALEOptional

Number of fractional digits, for example 5.

PKOptional

Y for a primary-key column, otherwise N. Use Y on multiple rows for a composite key.

NULLABLEOptional

Y to allow NULL; N for NOT NULL. Primary keys are automatically NOT NULL.

COMMENTOptional

Column description used by COMMENT SQL and Java field comments.

Headers are case-insensitive. Aliases such as COLUMN_NAME/컬럼명, DATA_TYPE/데이터타입, and COMMENT/설명 are recognized. The canonical English headers above are recommended for shared sheets.

1. Prepare the sheet like this

COLUMN_NAMEDATA_TYPELENGTHPRECISIONSCALEPKNULLABLECOMMENT
USER_IDVARCHAR30YNUser ID
USER_NMVARCHAR100NNUser name
AGEINTEGERNYAge
CREATED_ATTIMESTAMPNNCreated at

Select A1:H5. You may put a size directly in DATA_TYPE, such as VARCHAR(30) or NUMBER(20,5), and leave LENGTH, PRECISION, and SCALE blank.

2. Choose these sidebar options

Mode
SCHEMA
DBMS
PostgreSQL
Operation
CREATE TABLE
Table name
TB_USER
Table description
User
Preserve original column case
Off

3. Review the result

PostgreSQL · CREATE TABLE
CREATE TABLE TB_USER (
    USER_ID VARCHAR(30) NOT NULL,
    USER_NM VARCHAR(100) NOT NULL,
    AGE INTEGER,
    CREATED_AT TIMESTAMP NOT NULL,
    CONSTRAINT PK_TB_USER PRIMARY KEY (USER_ID)
);
DBMS conversion

Generating the same definition for Oracle, PostgreSQL, MySQL, MariaDB, or Microsoft SQL Server maps types such as VARCHAR2/VARCHAR, NUMBER/NUMERIC/DECIMAL, and CLOB/TEXT for the target. Always review the result against your team’s type and constraint conventions before applying it.

04 / DEVELOPMENT CODE

Java VO / MyBatis

Reuse the same SCHEMA table used for DDL. COLUMN_NAME becomes a camelCase Java field, and DATA_TYPE is mapped to Java and JDBC types for the selected DBMS.

JAVA DTO / VO

Generate a Java VO

  1. In SCHEMA mode, select the definition range and refresh it.
  2. Choose JAVA DTO / VO as the operation and VO as the kind.
  3. Enter a package such as com.example.user.vo and a Class Name such as UserVo.
  4. Choose @Data, @Getter / @Setter, or None for Lombok. None generates explicit getters and setters.
  5. Turn on Field Comment to include COMMENT values as JavaDoc.
MYBATIS

Generate mapper XML

  1. Choose an individual MyBatis operation or MYBATIS FULL CRUD.
  2. Enter the table name TB_USER, Class Name UserVo, and its Package.
  3. Choose DTO / VO or Map for MyBatis Result.
  4. For Full CRUD, leaving Mapper Namespace blank derives it from the Class Name and Package.
  5. UPDATE, DELETE, and MERGE/UPSERT require at least one SCHEMA row with PK set to Y.

SCHEMA operation guide

CREATE TABLE

Table-creation DDL

COMMENT SQL

Table and column comment SQL

FULL SQL CRUD

DBMS-specific SELECT, INSERT, UPDATE, DELETE, and UPSERT SQL

MYBATIS FULL CRUD

Complete resultMap and CRUD mapper XML

ALL GENERATE

DDL, comments, Java, MyBatis, and SQL CRUD in one result

05 / TROUBLESHOOTING

Common issues

Generate button is disabled

Select a range, click “Refresh range,” and fill the fields required by the current operation, such as Table name, PK columns, or Class Name.

Error says headers and data are required

DATA mode requires the header row and at least one data row in the same selection.

COLUMN_NAME or DATA_TYPE is missing

Make sure both required headers are present in the first SCHEMA row. Spaces and underscores are accepted, but do not include duplicate aliases for the same field.

Primary-key error

DATA UPDATE, DELETE, and UPSERT require actual header names in the PK columns field. SCHEMA MyBatis UPDATE, DELETE, and UPSERT require at least one row with PK set to Y.

Java type is generated as Object

An unsupported database type is safely mapped to Object and shown as a warning. Check the DBMS and DATA_TYPE, then adjust the Java type if needed.