Re: Another interview question

From: Ian C. Sellers <ian#_don't_need_no_stinking_spam_#_at_mystical.net>
Date: 1997/07/09
Message-ID: <33C3F6EE.636A89EB_at_mystical.net>#1/1


Steve Phelan wrote:

> 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.

You sound just like a DBA Steve! I think you'd be hired. :-} -Ian (Developer) Received on Wed Jul 09 1997 - 00:00:00 CEST

Original text of this message