Re: Another interview question

From: Bryan Dollery <bryan_at_bryan.prestel.co.uk>
Date: 1997/07/12
Message-ID: <33C7FF01.B168D59F_at_bryan.prestel.co.uk>#1/1


This is a multi-part message in MIME format.

--------------16631B07DFD7145323458FEB
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

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

No.

This is the only solution that fits the MUST HAVE requirements of:

	minimal or no impact on the application, easy 
	to implement, flexible and generic

If these non-functional requirements were dropped however, a trigger which truncated values to integers would do the trick. This would slow down performance of the application by a factor dependant upon the number of inserts into this column, hence violating the minimal, or no impact policy.

Also a trigger to do this would be tied to the particular column or the particular table. Not particularly generic.

This approach is however very easy to implement, and quite flexible. It also fulfils the functional requirement nicely.

However, I still wouldn't do it this way.

I'm a very well paid development consultant, I would never want to be a DBA ;-) Bryan



Bryan Dollery BSc.(Hons).
MD - ByteSmart Systems Ltd.
--------------16631B07DFD7145323458FEB
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Bryan Dollery
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Bryan Dollery
n:              Dollery;Bryan
org:            ByteSmart Systems Ltd.
adr:            ;;;;;;England
email;internet: bryan_at_bryan.prestel.co.uk
note:           Consultant Software Engineer
=0A=
B.Sc. (Hons). Software Engineering
=0A=
MD - ByteSmart Systems Ltd.
x-mozilla-cpt: ;0
x-mozilla-html: TRUE
end: vcard

--------------16631B07DFD7145323458FEB-- Received on Sat Jul 12 1997 - 00:00:00 CEST

Original text of this message