Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: data type conversion
2006/4/3, Giovanni Cuccu <giovanni.cuccu_at_gmail.com>:
> Ciao Simone,
Ciao Giovanni!
> if I correctly understand your question, I think the only way is to
> read the mysql manual for the version you are migrating and setting up
> a (perl) script that does the appropriate conversion.
> The first choice you have to do is if you will oracle built-in data
> types or a mix of ANSI and oracle ones. The latter makes the
> conversion easier (since you have more destination types).
> some examples
> MySQL integer type tinyint (-128,127) can be mapped to Oracle number
> (builtin) or integer(ANSI); the same for smallint, mediumint, int
> MySQL data types.
> You must write some perl code that find 'int' and replaces it with the
> correct one.
Yes, you perfectly understand what I want to do
> You can evaluate if it's worth adding a constraint on column minimum
> and maximum values in the Oracle table to better emulate the mysql
> behaviour.
mmmh, for example, I can map a mysql integer with an oracle number(10,0)
> Some problems arise when dealing with char types; the main problem I
> see is that mysql allows varchar to hava a maximum length of 65k while
> oracle limits it to 4k. The only choice, AFAIK, is to switch to CLOB,
> but this may cause also some application code rewriting.
> Essentially you have to look at chapter 11 of mysql manual (I'm
> referring to version 5 available at
> http://downloads.mysql.com/docs/refman-5.0-en.a4.pdf) and at chapter 2
> of oracle SQL manual (I'm referring to oracle 10g2 doc) and try to
> understand what to do.
Thank you very much, regards
Simone Saravalli
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Apr 03 2006 - 10:53:40 CDT