creating temporal table

Database
Enthusiast

creating temporal table

Hi,

I am new to td 13 temporal database concept.

I tried to create temporal table by following :-

CREATE MULTISET TABLE Policy(

Policy_ID INTEGER,

Customer_ID INTEGER,

Policy_Type CHAR(2) NOT NULL,

Policy_Details CHAR(40),

Validity PERIOD(DATE) NOT NULL AS VALIDTIME

)

PRIMARY INDEX(Policy_ID);

its giving syntax error like "expected check or unique between NULL and AS keyword.

database version :- teradata 13.00.0105.

7 REPLIES
Senior Apprentice

Re: creating temporal table

The temporal stuff is a new feature in TD13.10, but you're trying it on TD13.0 :-)

Dieter
Enthusiast

Re: creating temporal table

Hi!

Are there any sample project in connection with the Teradata Plug-In for eclipse? I'm also interested in the system's temporal services, so I'd like to create a simple project in eclipse to demonstrate these capabilities. I think it would be very useful (not just) for me. Thanks!

Teradata Employee

Re: creating temporal table

The following are two articles explaining how to use Period data types:

http://developer.teradata.com/database/articles/ exploring-teradata-13s-period-data-type

http://developer.teradata.com/database/articles/ exploring-teradata-13s-period-functions

Once you have a good understanding of period data types you can use the different Teradata Java Wizards in the Teradata Plug-In for eclipse to  create  a sample using period data types.

A fun Wizard you can start with is the iBatis CRUD Wizard:

http://developer.teradata.com/tools/articles/ibatis- crud-wizard

 

 

Enthusiast

Re: creating temporal table

I have already found the first two article, but the third is really new for me - and as I ran through it, it will be very useful later. Thanks a lot! :)

Do you think that this iBatis-thing is the best for me to compare the conventional support with TD 13.10's temporal support (through simple examples like in Snodgrass's case study)?

Teradata Employee

Re: creating temporal table

I am not familiar with Snodgrass's case study, but if you want to create an application with different queries you can use the iBatis SQL Map and the iBatis DAO with Web Services Wizards.

iBatis SQL Map Wizard:

http://developer.teradata.com/tools/articles/create-an-ibatis-sql-map-with-teradata-plug-in-for-ecli...

iBatis DAO with Web Services Wizard:

http://developer.teradata.com/tools/articles/ibatis-dao-with-web-services-wizard

Enthusiast

Re: creating temporal table

Teradata Employee

Re: creating temporal table

The iBatis SQL Map Wizard from Teradata Plug-In for Eclipse

should work with the queries from the Snodgrass' case study.