Re: Informix Serial Data type to Integer Data Type
Posted in 2006
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Data Types & Schema Design, Java & JDBC Development
In message <1136548271.098176.319600@z14g2000cwz.googlegroups.com>, Sarat <saratr@gmail.com> writes >We have 2 Java applications and some Esql/c scripts inserting/updating >data into Informix 9.30 Dynamic server tables simultaneously. At >present the Primary keys in these tables are of Informix Serial data >type. Now we are planning to change Serial data type to Integer data >type. May I know the possible (options/changes/any issues which may >occur) which need to be done for achieving the same? Why do this? I can see you might want to change the primary key (though the Informixes I have worked with don't care what it is, so long as there is *a* key that helps the operation), but I cannot see the advantage in getting rid of the serial column. I have seen a number of cases where there is reasonably more than one unique key on a table. -- Surfer! Email to: ramwater at uk2 dot net
Surfer! wrote: > In message <1136548271.098176.319600@z14g2000cwz.googlegroups.com>, > Sarat <saratr@gmail.com> writes > >> We have 2 Java applications and some Esql/c scripts inserting/updating >> data into Informix 9.30 Dynamic server tables simultaneously. At >> present the Primary keys in these tables are of Informix Serial data >> type. Now we are planning to change Serial data type to Integer data >> type. May I know the possible (options/changes/any issues which may >> occur) which need to be done for achieving the same? > > > Why do this? I can see you might want to change the primary key (though > the Informixes I have worked with don't care what it is, so long as > there is *a* key that helps the operation), but I cannot see the > advantage in getting rid of the serial column. I have seen a number of > cases where there is reasonably more than one unique key on a table. > Well, there's nothing wrong with a table having more than one candidate key. A serial column is a surrogate key - it tells you nothing about your data except the order you inserted it. They are, of course, highly efficient to index. And, apart from the way they treat zero, equivalent to an integer in any case. I'd leave well alone.