Datatypes and Usefulness

General

Datatypes and Usefulness

Hi All,

   I am new to Teradata, but come from an Oracle background. I am building a Warehouse and want to ensure that I do use storage space effectively. One of the considerations which I am having is define the datatypes effectively.

As such, I would like to understand that if I want to store a single value integer which can have values 1, 2 and 3 then what datatype should I define for it. I think I can define BYTEINT for it. What are your views on this.

Any help in this is much appreciated.

Thanks and Regards,

Mithun

1 REPLY

Re: Datatypes and Usefulness

Hi Mithun,

For integer, you have these options:

Datatype Byte Range

BYTEINT     1     -128 thru 127

SMALLINT    2     32768 thru 32767

INTEGER     4     2,147,483,648 to 2,147,483,647

BIGINT      8     9,223,372,036,854,775,808 thru 9,223,372,036,854,775,807

So, you decide accordingly based on the requirement.

You can think in the direction of MVC too, to use effectively. But be aware there are cases it is not cost-effective.

Cheers,

Raja