Salesforce

SQL (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

SQL (Magic xpa 4.x)

The following properties appear in the SQL section:

Part of Datetime

The Part of Datetime property value is a reference to the Time field in the same database table, which together with the Date field combines the Datetime value in the SQL database. See also Part of Datetime.

Database Information

The SQL Database Information property lets you supply database-dependent information that Magic xpa can pass to the underlying RDBMS. The use of this property is optional. See also Database Information - Database Property.

DB Column Name

The actual name of the column as it is defined in the underlying database. This name has the limitations of the specific database (such as reserved words that cannot be used in a column name).

When adding a new column to a table, Magic xpa copies the name of the column to the DB Name column, and replaces blanks with underscores. You can overwrite the name that appears in the DB Column name, but you cannot leave the DB Name column blank.

The Get Definition operation brings in DB column names without the double quotes. If your column name has double quotes, then after getting the definition, you need to manually add the quotation marks.

Type

The SQL data type of the column in the underlying RDBMS. It is loaded when Get Definition is performed. When creating a new table in the Data repository, Magic xpa uses its own default mapping, which eliminates the need to specify the database data type. In order to force the use of a specific data type in cases where the Magic xpa default is not sufficient, a different data type can specified.

For example, the Magic xpa date column is mapped to the ‘DATE’ data type in Oracle. You can, however, force Magic xpa to map the Date column to a different data type by specifying CHAR (8) as the SQL type. See SQL Considerations for details of the mapping between Magic xpa and each RDBMS.

User Type

The User Defined Type (UDT) as defined in the database. In most RDBMSs, a user defined type can be created to redefine a system data type.

For example, the UDT ‘description’ is based on ‘VARCHAR(20)’. Once a UDT is created, it can be used in the CREATE TABLE and ALTER TABLE statements, as well as attaching defaults and rules to it.

When loading a table definition (using the Get Definition utility), Magic xpa loads the UDT of each column, and the system data type on which it is based. This is for internal use only. When creating tables in Magic xpa, Magic xpa uses the SQL type only. Magic xpa will not create the columns with a UDT.

Relevant interfaces: MSSQL and DB2

Reference
Attachment 
Attachment