MySQL Forums
Forum List  »  Informix

Table conversion from Informix to MySQL 4.1
Posted by: Andreas Grote
Date: July 29, 2005 07:58AM

Hey!
I'm doing some first steps in converting existing Informix tables to MySQL (4.1) and was positivley suprised how easy this seems to be. Can you have a look at the following example and give me a hint if there are pitfalls I didn't recognize?

Original Informix table:
create table example
(
number integer not null,
enroute char(30) default "",
object char(70),
attribute char(50),
value char(80),
lastupdate datetime year to second,
action char(1),
userid char(30),
commentlen smallint,
reserved char(18),
comments char(300),
reserved2 char(500)
);

MySQL 4.1 table syntax:
create table example
(
number integer not null, <- It seems that MySQL does automatically add a default 0?
enroute char(30) default "",
object char(70),
attribute char(50),
value char(80),
lastupdate datetime, <- Does this match "year-to-second" type?
action char(1),
userid char(30),
commentlen smallint,
reserved char(18),
comments text(300), <- Converted this to text as char was to small
reserved2 text(500) <- Converted this to text as char was to small
);
I think this is fine, any comments?

In Informix I sometimes saw statments like "extent size 16 next size 32" at the end of the table definition. Can I just forget about them?

Converting indices also seems to be quite easy, e.g. a statement like
"create unique index exampleidx on example (object,attribute);"
is working 1:1 on MySQL :-)
Any pitfalls with create index known?

Thanks,
Andreas

Options: ReplyQuote


Subject
Views
Written By
Posted
Table conversion from Informix to MySQL 4.1
13983
July 29, 2005 07:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.