← Every conversion

Convert a MariaDB schema to Oracle

Paste the CREATE TABLE statements from MariaDB and ERD Designer draws them as a diagram. Change the diagram's target database to Oracle and every column's datatype is converted. You review each change before it is applied, then generate the Oracle script.

You sign up free and land on your diagram. Your script is held for 15 minutes and deleted from our server the moment you open it.

What changes in the sample

Converted to Oracle 23ai, these columns of the sample above change type. Everything else keeps its type; names, keys, nullability and lists of allowed values are left as they are.

ColumnMariaDBOracleNote
customers.customer_idINTNUMBERnumbered by the database
customers.public_idUUIDRAW(16)default: UUID() → SYS_GUID()
customers.emailVARCHAR(255)VARCHAR2(255)
customers.full_nameVARCHAR(120)VARCHAR2(120)
customers.notesLONGTEXTCLOB
customers.is_activeTINYINT(1)BOOLEANdefault: 1 → TRUE
customers.last_ipINET6VARCHAR2(45)
customers.created_atDATETIME(3)TIMESTAMP(3)
orders.order_idBIGINTNUMBERnumbered by the database
orders.customer_idINTNUMBER
orders.statusENUMVARCHAR2(7)
orders.placed_atDATETIMETIMESTAMP
orders.receipt_pdfMEDIUMBLOBBLOB

What you are asked

Where Oracle offers more than one fair answer, ERD Designer asks before it converts — once per kind of column, not once per column. For this page each question was answered with its first option:

Auto-numbered keys — answered NUMBER identity

UUID columns — answered RAW(16)

Long text — answered CLOB

True / false columns — answered BOOLEAN

orders.status — answered VARCHAR2(7)

What it tells you

Where a conversion loses something, ERD Designer says so rather than picking for you. These are the messages for the sample:

The Oracle script

This is what ERD Designer generates for the sample, for Oracle 23ai. Our test suite applies this conversion to a real Oracle server and then reads the database back to confirm it matches the diagram exactly.

-- Create table customers
CREATE TABLE "customers" (
  "customer_id" NUMBER GENERATED BY DEFAULT AS IDENTITY NOT NULL,
  "public_id" RAW(16) DEFAULT sys_guid() NOT NULL,
  "email" VARCHAR2(255 CHAR) NOT NULL,
  "full_name" VARCHAR2(120 CHAR) NOT NULL,
  "notes" CLOB,
  "is_active" BOOLEAN DEFAULT 'true' NOT NULL,
  "last_ip" VARCHAR2(45 CHAR),
  "created_at" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP(3) NOT NULL,
  CONSTRAINT "customers_PK" PRIMARY KEY ("customer_id")
);

-- Create table orders
CREATE TABLE "orders" (
  "order_id" NUMBER GENERATED BY DEFAULT AS IDENTITY NOT NULL,
  "customer_id" NUMBER NOT NULL,
  "status" VARCHAR2(7 CHAR) DEFAULT 'new' NOT NULL CHECK ("status" IN ('new', 'paid', 'shipped')),
  "total" NUMBER(12,2) NOT NULL,
  "placed_at" TIMESTAMP NOT NULL,
  "receipt_pdf" BLOB,
  CONSTRAINT "orders_PK" PRIMARY KEY ("order_id")
);

-- Add unique constraint on customers (email)
ALTER TABLE "customers" ADD CONSTRAINT "customers_email_uq" UNIQUE ("email");

-- Create index on orders (placed_at)
CREATE INDEX "orders_placed_ix" ON "orders" ("placed_at");

-- Add foreign key orders (customer_id) → customers (customer_id)
ALTER TABLE "orders" ADD CONSTRAINT "orders_FK1" FOREIGN KEY ("customer_id") REFERENCES "customers" ("customer_id");

How to convert your own schema

  1. Paste your MariaDB script above and press Open in ERD Designer. The diagram opens laid out and ready to edit.
  2. Click the diagram's name in the toolbar to open its properties, choose Oracle under Target Database / Version, and press Apply Changes.
  3. If Oracle offers more than one way to store a kind of column, choose one and press Continue.
  4. Read the list of retyped columns and any warnings, then press Apply Conversion. Save the diagram to keep it.
  5. Press Generate DDL (the database icon) to copy or download the Oracle script — or apply it to a database on your own network with the ERD Designer Agent.

What it reads, and what it does not

Which plan you need

Pasting a script and working with it as a diagram is free on the Basic plan, with no card. Converting a diagram to another database is part of the Pro and Advanced plans, which also generate its script and can apply it through the Agent.

Other conversions

Questions? Write to support@erddesigner.com. · ERD Designer · Terms · Privacy