Docs
Short notes on the schema problems Schemint flags and on what it
generates. No fluff, with real SQL and Java.
-
From CREATE TABLE to JPA Entity: the type mapping
How PostgreSQL types map to Java in a JPA Entity: identity, BigDecimal, timestamps, wrappers, and why.
-
PostgreSQL doesn't index your foreign keys
Why FKs get no index automatically, what it costs in joins and deletes, and the query to find the missing ones.
-
That VARCHAR status column is an enum in denial
CHECK constraint, native ENUM or lookup table: how to pick, and how to map it with @Enumerated in JPA.
-
Money in PostgreSQL and Java: NUMERIC and BigDecimal
Why float breaks money math, how to size NUMERIC, and the three classic BigDecimal traps.
-
created_at and updated_at: database DEFAULT or JPA annotation?
Pick one source for audit timestamps, and when timestamptz beats timestamp.
-
From JSON to Pydantic and TypeScript models
Inferring a schema from real payloads: mixed types, optional vs nullable fields, and date formats.
-
SQL schema diff: spotting breaking changes before deploy
Which schema changes break running clients, which don't, and the expand/contract pattern for the rest.
-
Tables without a primary key: what actually goes wrong
Duplicates, replication, ORMs and unaddressable rows: why even staging tables deserve an id.
-
timestamp vs timestamptz: which one your columns should be
Why timestamptz should be your default, what timestamp actually stores, and how the two behave across time zones in PostgreSQL.
-
TEXT vs VARCHAR(n) in PostgreSQL: the length limit myth
TEXT and VARCHAR store the same way in Postgres; when a length cap helps, when it just hurts, and how it maps to Java and TypeScript.
-
BIGSERIAL and JPA: IDENTITY vs SEQUENCE generation
How BIGSERIAL maps to @GeneratedValue, why IDENTITY disables JDBC batch inserts, and when SEQUENCE with an allocationSize wins.
-
Nullable vs optional: what a missing JSON field really means
A field that is null, a field that is absent, and a field that is sometimes both, and how each should map to Pydantic and TypeScript.
-
UUID vs BIGINT primary keys in PostgreSQL
Index size, insert locality and exposure trade-offs between UUID and BIGINT keys, plus UUIDv7 as the middle ground.
-
Flyway migrations: versioned naming and FK-safe ordering
Flyway's V__ naming rules, why migration order matters for foreign keys, and how to keep a linear history across a team.
-
JSON vs JSONB in PostgreSQL: when the B matters
JSONB is binary, indexable and faster to query; JSON preserves formatting. Which to pick, GIN indexes, and the update cost.
-
Reading EXPLAIN ANALYZE: where the time actually went
How to read a PostgreSQL query plan: actual vs estimated rows, loops, seq scans, spilled sorts, and the numbers that matter.
-
Sensitive columns: what never goes in a table as plain text
Passwords, tokens, documents and PII in the schema: hash or encrypt what, mask what in logs, and how a column name gives it away.
-
Boolean flags: BOOLEAN, not TINYINT, CHAR or INT
Why flags stored as numbers or chars invite tri-state bugs, the MySQL TINYINT(1) convention, and how flags map to Java and TypeScript.
-
MySQL vs PostgreSQL data types: what changes in a migration
AUTO_INCREMENT vs identity, TINYINT(1) vs BOOLEAN, DATETIME vs timestamptz, unsigned ints, ENUM: the type mapping that makes or breaks a MySQL to Postgres move.
-
UNIQUE constraints and the check-then-insert race
Why validating uniqueness in the application isn't enough, how the database constraint closes the race, and handling the violation gracefully.
Generators
Paste a schema or a JSON and get the models. Each opens with a live example.
-
PostgreSQL CREATE TABLE to TypeScript interface
Generate a TypeScript interface from a PostgreSQL CREATE TABLE. Nullable columns become optional; BIGINT and NUMERIC are yours to map to number or string.
-
PostgreSQL CREATE TABLE to Pydantic model
Generate a Pydantic v2 model from a PostgreSQL CREATE TABLE: Optional for nullable columns, Decimal for money, datetime for timestamps.
-
PostgreSQL CREATE TABLE to SQLAlchemy model
Generate a SQLAlchemy 2.0 model from a PostgreSQL CREATE TABLE: typed Mapped columns, primary key, nullable and unique constraints.
-
PostgreSQL CREATE TABLE to SQLModel
Generate a SQLModel class from a PostgreSQL CREATE TABLE: table=True, primary key Field, Optional for nullable columns.
-
PostgreSQL CREATE TABLE to JPA Entity (Spring Boot)
Generate a JPA @Entity from a PostgreSQL CREATE TABLE: @Id, @GeneratedValue, @Column with nullable/unique/length, BigDecimal for NUMERIC.
-
PostgreSQL CREATE TABLE to Flyway migration
Turn a PostgreSQL CREATE TABLE into a versioned Flyway migration (V1__...sql) with normalized DDL and FK-aware table ordering.
-
MySQL CREATE TABLE to TypeScript interface
Generate a TypeScript interface from a MySQL CREATE TABLE. TINYINT(1) becomes boolean, nullable columns become optional.
-
MySQL CREATE TABLE to Pydantic model
Generate a Pydantic v2 model from a MySQL CREATE TABLE: TINYINT(1) becomes bool, DECIMAL becomes Decimal, DATETIME becomes datetime.
-
MySQL CREATE TABLE to SQLAlchemy model
Generate a SQLAlchemy 2.0 model from a MySQL CREATE TABLE: typed Mapped columns, primary key, nullable and unique constraints.
-
MySQL CREATE TABLE to JPA Entity (Spring Boot)
Generate a JPA @Entity from a MySQL CREATE TABLE: @Id, @GeneratedValue for AUTO_INCREMENT, @Column with nullable/unique/length.
-
JSON to TypeScript interface
Generate a TypeScript interface from a JSON payload. Types are inferred from real values; nullable and optional fields are handled.
-
JSON to Pydantic model
Generate a Pydantic v2 model from a JSON payload. Types are inferred from real values; optional and nullable fields are handled.
-
JSON to Go struct
Generate a Go struct from a JSON payload: json tags, pointers for nullable fields, time.Time for timestamps.
-
PostgreSQL CREATE TABLE to Go struct
Generate a Go struct from a PostgreSQL CREATE TABLE: json tags, pointers for nullable columns, string for NUMERIC money.
-
JSON to Kotlin data class
Generate a Kotlin data class from a JSON payload: types inferred from real values, nullable fields become T? = null.
-
PostgreSQL CREATE TABLE to Kotlin data class
Generate a Kotlin data class from a PostgreSQL CREATE TABLE: T? = null for nullable columns, BigDecimal for NUMERIC, java.time types.
-
JSON to Rust struct (serde)
Generate a Rust struct with serde derives from a JSON payload: Option for nullable fields, rename attributes for camelCase keys.
-
PostgreSQL CREATE TABLE to Rust struct (serde)
Generate a Rust struct with serde derives from a PostgreSQL CREATE TABLE: Option for nullable columns, String for NUMERIC money.
-
JSON Schema to TypeScript interface
Generate a TypeScript interface from a JSON Schema or OpenAPI components. Declared types, required and nullable carry over.
-
OpenAPI / JSON Schema to Pydantic model
Generate Pydantic v2 models from OpenAPI components.schemas or a JSON Schema: one model per schema, Optional and formats handled.
-
CSV to SQL CREATE TABLE
Generate a CREATE TABLE from a CSV: column types inferred from the values, headers sanitized, empty cells become nullable.
-
CSV to Pydantic model
Generate a Pydantic v2 model from a CSV: types inferred from the values, Optional for columns with empty cells.
-
JSON to Zod schema
Generate a Zod schema from a JSON payload: types inferred from real values, .nullable() for missing fields, z.infer type included.
-
PostgreSQL CREATE TABLE to Zod schema
Generate a Zod schema from a PostgreSQL CREATE TABLE: .max() from VARCHAR lengths, .uuid() for UUID, .nullable() for nullable columns.
-
PostgreSQL CREATE TABLE to Prisma schema
Generate Prisma models from a PostgreSQL CREATE TABLE: relations from foreign keys, @map for snake_case, native types, @default carried over.
-
JSON to Prisma schema
Generate Prisma models from a JSON payload: types inferred from real values, optional fields, ready for schema.prisma.
-
SQL INSERT generator - test data from a CREATE TABLE
Generate INSERT statements with realistic test data from a CREATE TABLE: emails look like emails, prices have two decimals, foreign keys point at rows that exist.
-
Mock data generator - realistic JSON from a sample payload
Generate mock JSON fixtures from a sample payload or schema: shape inferred from real values, realistic names, emails and prices, reproducible output.
-
SQL formatter - format and beautify SQL online
Format SQL online: consistent indentation, uppercased keywords, one clause per line. PostgreSQL, MySQL, SQL Server, Oracle and more. Nothing you paste is stored.
-
Convert MySQL to PostgreSQL online
Convert MySQL DDL and queries to PostgreSQL: AUTO_INCREMENT to identity, TINYINT(1) to boolean, ENUM to CHECK, unsigned types mapped, ENGINE options dropped.
-
Convert PostgreSQL to MySQL online
Convert PostgreSQL DDL and queries to MySQL: BIGSERIAL to AUTO_INCREMENT, identity columns, NUMERIC to DECIMAL, type names mapped.
-
Convert SQL Server (T-SQL) to PostgreSQL online
Convert SQL Server DDL and queries to PostgreSQL: IDENTITY to generated columns, NVARCHAR to VARCHAR, DATETIME2 to TIMESTAMP, GETDATE() translated.
-
Convert Oracle to PostgreSQL online
Convert Oracle DDL and queries to PostgreSQL: NUMBER to DECIMAL, VARCHAR2 to VARCHAR, SYSTIMESTAMP translated, identity columns carried over.