This product version has reached end of life and is no longer supported. Click here for the latest documentation.

When you manage your entities, through Entity actions , simple , or advanced queries, Service Studio translates Service Studio data types into Database data types (SQL Server or Oracle).

The next table presents how the Service Studio data types are translated to the supported Database Management Systems data types.

Service Studio data type

SQL Server data type

Oracle data type

Text

Varchar() or Text

NVarchar() or NText, if your Database supports Unicode (check this feature with the Platform Server Configuration Tool)

Varchar2() or Clob

Integer

Int

Number(10)

Decimal

Decimal()

Number()

Boolean

Bit

Number(1)

Date Time

Datetime

Timestamp

Date

Datetime

Timestamp

Time

Datetime

Timestamp

Phone Number

Varchar(20)

Varchar2(20)

Email

Varchar(250)

Varchar2(250)

Binary Data

Image

Blob

Currency

Decimal(37,8)

Number(37,8)

Entity Identifier

Depends on the type of the Identifier.

Text

If the Length property of the attribute is less than or equal to 2000, the corresponding data type is Varchar() , in an SQL Server database, or Varchar2() , in an Oracle database, with the Length you specified in Service Studio.

If the Length property of the attribute is greater than 2000, the he corresponding data type is Text , in an SQL Server database, or clob , in an Oracle database.

There are some limitations when using Text or clob; for example, in SQL Server, you cannot sort by a column of the Text type. You should check for additional information about these limitations in the Database Management Systems documentation.

If you try to create or update an attribute with text that exceeds the length specified in this attribute, the operation is aborted and a database exception is raised.

Integer

The corresponding data type is Int , in an SQL Server database, or Number(10) , in an Oracle database.

If the attribute is specified as auto number (i.e. IsAutoNumber property is set to Yes), the corresponding data type is Int with the Identity keyword, in an SQL Server database, or Number(10) with an associated sequence , in an Oracle database.

Decimal

The corresponding data type is Decimal() , in an SQL Server database, or Number() , in an Oracle database, as specified in Service Studio, i.e. with the same values for the Length and Decimal properties (Length is the maximum number of digits that can be stored, both on the left and right sides of the decimal point).

If you try to create or update an attribute with a Decimal that exceeds the length of this attribute, the operation is aborted and a database exception is raised.

If the Decimal part of the attribute is bigger than the Decimal part of the corresponding column the value is rounded and inserted.

Example

The Balance attribute has the definition: Decimal (3,1). You can insert a record that contains the following values:

99.2

99.12 g converted to 99.1

99.16 g converted to 99.2

But you cannot insert the value:

100

Boolean

The corresponding data type is Bit , in an SQL Server database, or Number(1) , in an Oracle database.

Date Time

The corresponding data type is Datetime , in an SQL Server database, or Timestamp , in an Oracle database. The range of this data type supported by OutSystems Platform goes from 1900-01-01 00:00:00 to 3000-12-31 23:59:59.

Date

The corresponding data type is Datetime , in an SQL Server database, or Timestamp , in an Oracle database. The range of this data type supported by OutSystems Platform goes from 1900-01-01 to 3000-12-31. A Date is equivalent to a Datetime with a time part of 00:00:00.

Time

The corresponding data type is Datetime , in an SQL Server database, or Timestamp , in an Oracle database. A Time is equivalent to a Datetime with a date part of 1900-00-00.

Phone number

The corresponding data type is Varchar(20) , in an SQL Server database, or Varchar2(20) , in an Oracle database.

If you try to create or update an attribute with a Phone Number that is bigger than 20 characters, the operation is aborted and a database exception is raised.

Binary data

The corresponding data type is Image , in an SQL Server database, or Blob , in an Oracle database.

Currency

The corresponding data type is Decimal(37,8) . The rules explained above for the Decimal data type also apply to the Currency data type.

See Also

Null Behavior on Database | Available Data Types