Rails With Oracle 12c R1

Hi there,
I've been tasked with getting our Rails 3 application to play nice with
Oracle 12c R1. Has anyone had experience doing this? What problems did you
encounter? So far we have found that our (large number of) DB objects
(column names and indexes) were either over 30 characters long or
non-unique, and that empty strings are treated as null and as a result our
record objects can't be inserted.

Yours sincerely,
Hemal

I maintained/enhanced a Rails + Oracle app a long time ago. The
only issue I remember was the 30-character index name limit being
a PITA.

However, this was running JRuby using a JDBC driver, so that might
be significant - probably worth a quick test to see if it addresses the
"empty string" issues you're having.

HTH!

···

On Wed, Jul 19, 2017 at 5:09 AM, Hemal Varambhia <h.n.varambhia@gmail.com> wrote:

I've been tasked with getting our Rails 3 application to play nice with
Oracle 12c R1. Has anyone had experience doing this? What problems did you
encounter? So far we have found that our (large number of) DB objects
(column names and indexes) were either over 30 characters long or
non-unique, and that empty strings are treated as null and as a result our
record objects can't be inserted.

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

Hi, Hasan,
Thank you for responding so quickly. I don't think we will be using JRuby
with a JDBC driver (though that could change- who knows!). The other thing
I forgot to mention is that at application inception (about 8 years ago),
the DB chose (currently being used in production) is MySQL. I guess a lot
of the DB object names that are acceptable for MySQL aren't for Oracle.
Essentially we would like to be able to support both.

Hemal

···

On 19 July 2017 at 15:17, Hassan Schroeder <hassan.schroeder@gmail.com> wrote:

On Wed, Jul 19, 2017 at 5:09 AM, Hemal Varambhia > <h.n.varambhia@gmail.com> wrote:

> I've been tasked with getting our Rails 3 application to play nice with
> Oracle 12c R1. Has anyone had experience doing this? What problems did
you
> encounter? So far we have found that our (large number of) DB objects
> (column names and indexes) were either over 30 characters long or
> non-unique, and that empty strings are treated as null and as a result
our
> record objects can't be inserted.

I maintained/enhanced a Rails + Oracle app a long time ago. The
only issue I remember was the 30-character index name limit being
a PITA.

However, this was running JRuby using a JDBC driver, so that might
be significant - probably worth a quick test to see if it addresses the
"empty string" issues you're having.

HTH!
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--

"Musbury",
16 Devonshire Road,
Mill Hill,
London,
NW7 1LL

Home: +44 (0) 208 346 6444
Mobile: +44 (0) 7751 879 908

The short-name restriction requires some hand-tuning but shouldn't
be insurmountable.

I never saw the "empty strings as nulls" problem (to the best of my
memory, it was years ago) but that seems like behavior that might
have a driver flag to change it.

Best of luck!

···

On Wed, Jul 19, 2017 at 1:30 PM, Hemal Varambhia <h.n.varambhia@gmail.com> wrote:

forgot to mention is that at application inception (about 8 years ago), the
DB chose (currently being used in production) is MySQL. I guess a lot of the
DB object names that are acceptable for MySQL aren't for Oracle. Essentially
we would like to be able to support both.

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote