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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Another interview question

Re: Another interview question

From: Steve Phelan <stevep_at_no-spam.pmcgettigan.demon.co.uk>
Date: 1997/07/09
Message-ID: <33C3504B.991ADE5C@no-spam.pmcgettigan.demon.co.uk>#1/1

Michael Serbanescu wrote:

> "A production database table contains a column defined as NUMBER(6,2).
>
> However, at this point in the life of the application using the table,
>
> *only integer numbers* can be used (although this may change in the
> future, hence the column format). All the values currently contained
> in
> the column are integers. Can you, the ORACLE DBA, provide as soon as
> possible, a solution to this problem, i.e. allow only integers in that
>
> column ? Your solution must have minimal or no impact on the
> application, be easy to implement, flexible and generic."
>
> Michael Serbanescu

Yes, this ones real easy: You screwed up your database and application design.

OK, you could look at check constraints or triggers maybe, but I'd really leave the column as NUMBER(6) if you only wanted integers in it; change it LATER when you want decimal places. Are you going to just throw away the fractional parts or throw errors out at the user in the meantime? - seems a poor way of designing an application to me...

Probably NOT the answer you were looking for, but the *right* one! :-)

Steve Phelan. Received on Wed Jul 09 1997 - 00:00:00 CDT

Original text of this message

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