Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: data type conversion

Re: data type conversion

From: Simone Saravalli <s.saravalli_at_gmail.com>
Date: Mon, 3 Apr 2006 17:53:40 +0200
Message-ID: <33ee34370604030853r79724370q1f1929bb383a1d19@mail.gmail.com>


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-l
Received on Mon Apr 03 2006 - 10:53:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US