Generate Database Definition Language (DDL) from a JSON. A Database Table definition for each object of the json and each child key of the json object defined as Column of the Database Table. The column Type is determined based on the key value if checked. Otherwise every column is defined as VARCHAR (100) except PRIMARY KEY columns.
If any sub object of the root element has ID key as child then that is referred as a forien key in parent table. Ex: Order as the parent and Customer as the child of Order and CustomerID is part of Order table as forien key. Otherwise child table has parent's primary key as forien key, as an example Order as the parent and ShipTo as child.
All array objects will have parent tables primary key as forien key as one of the column. Only first occurance of the array is considered for the Table.
Paste json in below textarea and click on Generate DDL
Note: Use the Parent name as the enclosing key. As an example {"PurchaseOrder": {....}} to define PurchaseOrder. Use Click here below to see an example.
Click here to try