Creating Database Table from Metadata and Database Connection

As the last option, you can also create a database table on the basis of metadata (both internal and external).

When you select the Create database table item from each of the two context menus (called out from the Outline pane and/or Graph Editor), a wizard with a SQL query that can create database table opens.

Creating Database Table from Metadata and Database Connection

Figure 28.21. Creating Database Table from Metadata and Database Connection


You can edit the contents of this window if you want.

When you select some connection to a database. For more details see Chapter 33, Database Connections. Such database table will be created.

On the next page we present two tables with an overview of conversion from CloudConnect data types to SQL (database) data types.

[Note]Note

If multiple SQL types are listed, actual syntax depends on particular metadata (size for fixed-length field, length, scale, etc.).

Table 28.15. CloudConnect-to-SQL Data Types Transformation Table (Part I)

DB typeDB2 & DerbyInformixMySQLMSSQLMSSQL
CloudConnect type   2000-20052008
booleanSMALLINTBOOLEANTINYINT(1)BITBIT
byteVARCHAR(80) FOR BIT DATABYTEVARBINARY(80)VARBINARY(80)VARBINARY(80)
CHAR(n) FOR BIT DATA BINARY(n)BINARY(n)BINARY(n)
cbyteVARCHAR(80) FOR BIT DATABYTEVARBINARY(80)VARBINARY(80)VARBINARY(80)
CHAR(n) FOR BIT DATA BINARY(n)BINARY(n)BINARY(n)
dateTIMESTAMPDATETIME YEAR TO SECONDDATETIMEDATETIMEDATETIME
DATEDATEYEAR DATE
TIMEDATETIME HOUR TO SECONDDATE TIME
  TIME  
decimalDECIMALDECIMALDECIMALDECIMALDECIMAL
DECIMAL(p)DECIMAL(p)DECIMAL(p)DECIMAL(p)DECIMAL(p)
DECIMAL(p,s)DECIMAL(p,s)DECIMAL(p,s)DECIMAL(p,s)DECIMAL(p,s)
integerINTEGERINTEGERINTINTINT
longBIGINTINT8BIGINTBIGINTBIGINT
numberDOUBLEFLOATDOUBLEFLOATFLOAT
stringVARCHAR(80)VARCHAR(80)VARCHAR(80)VARCHAR(80)VARCHAR(80)
CHAR(n)CHAR(n)CHAR(n)CHAR(n)CHAR(n)

Table 28.16. CloudConnect-to-SQL Data Types Transformation Table (Part II)

DB typeOraclePostgreSQLSQLiteSybaseGeneric
CloudConnect type     
booleanSMALLINTBOOLEANBOOLEANBITBOOLEAN
byteRAW(80)BYTEAVARBINARY(80)VARBINARY(80)VARBINARY(80)
RAW(n) VARBINARY(80)BINARY(n)BINARY(n)
cbyteRAW(80)BYTEAVARBINARY(80)VARBINARY(80)VARBINARY(80)
RAW(n) BINARY(n)BINARY(n)BINARY(n)
dateTIMESTAMPTIMESTAMPTIMESTAMPDATETIMETIMESTAMP
DATEDATEDATEDATEDATE
 TIMETIMETIMETIME
decimalDECIMALNUMERICDECIMALDECIMALDECIMAL
DECIMAL(p)NUMERIC(p)DECIMAL(p)DECIMAL(p)DECIMAL(p)
DECIMAL(p,s)NUMERIC(p,s)DECIMAL(p,s)DECIMAL(p,s)DECIMAL(p,s)
integerINTEGERINTEGERINTEGERINTINTEGER
longNUMBER(11,0)BIGINTBIGINTBIGINTBIGINT
numberFLOATREALNUMERICFLOATFLOAT
stringVARCHAR2(80)VARCHAR(80)VARCHAR(80)VARCHAR(80)VARCHAR(80)
CHAR(n)CHAR(n)CHAR(n)CHAR(n)CHAR(n)

Revised: 2010-07-30