MacLochlainns Weblog

Michael McLaughlin's Technical Blog

Site Admin

Add User Defined Types

with 3 comments

Somebody asked me if there was a cheaper alternative to using the Embarcadero Data Architect (a data modeling tool). I said sure, you can use the MySQL Workbench. My friend laughed and said, it’s to model Oracle databases and they use different data types. I broke the news to him that he can create his own user defined types and use MySQL Workbench to model problems for the Oracle Database 11g.

For example, you can launch the MySQL Workbench, and click on the Model menu option, and in the menu window click on the User Defined Types choice, as shown in the following:

UserDefinedType

Choosing the User Defined Type option, launches the following form. You can enter customized user defined types in the User Defined Types module:

MySQLWB_UserDefinedTypes01

You enter user defined types by entering a name value and choosing valid MySQL type value before clicking the Add button. When you’ve added your last user defined type, click the OK button instead of the Add button. The next screen shot shows how you can create Oracle Database 11g native data types, specifically the NUMBER and VARCHAR2 data types.

MySQLWB_UserDefinedTypes02

Hopefully, this has shown that you can create User Defined Types let you use MySQL Workbench to create Oracle ERD models. Here’s an example of a table with Oracle’s NUMBER and VARCHAR2 data types:

CustomGLTable

Yes, MySQL Workbench is a marvelous tool with wide potential for use to solve problems with MySQL and other databases.

Written by maclochlainn

February 28th, 2014 at 2:03 am

3 Responses to 'Add User Defined Types'

Subscribe to comments with RSS or TrackBack to 'Add User Defined Types'.

  1. good point.

    Jobin Augustine

    2 Mar 14 at 9:14 pm

  2. Hello,

    I’m using MySQL Workbench v6.3.6 build 511 CE (64 bits).
    I cannot define more than one user defined data type.

    Is it something missing in my installation ?

    Thanks on advance for assistance.

    Have a nice day!

    Regards,
    Ora

    Ora

    26 Jul 16 at 11:30 pm

  3. I just downloaded MySQL Workbench v6.3.6 Build 511 CE for the Mac OS and it worked as expected. What’s the platform and the error message?

    MySQLWorkbench636B511

    Here’s the working example with two types:

    MySQLWorkbench636UDT

    maclochlainn

    28 Jul 16 at 10:24 am

Leave a Reply