Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Design Consideration for Number Column
On Fri, 1 Apr 2005 23:46:00 +0800, "dd" <dd_at_dd.com> wrote:
>Is it a good design to use NUMBER for all numeric columns (vs specific
>precision, say, NUMBER(8,2))? Is there any real benefit to specify a
>precision ?
>
>I have this problem because Donald Bales in his book Java Programming with
>JDBC, Oreilly (chap 10.2) does recommend us defining both Integer and
>floating point values as NUMBER. I am not sure if JDBC type mapping is a
>reason for his recommendation.
>
>Thx for any advice
>
If you're storing large amounts of data, a warehouse for example, you will save space by declaring the scale and precision. It can get significant over a billion rows or so.
This is in addition to data integrity; as others have already pointed out.
Lewis
Author, ItToolBox Blog: An Expert's Guide to Oracle http://blogs.ittoolbox.com/oracle/guide/
Topic Editor, Suite101.com: Oracle Database http://www.suite101.com/welcome.cfm/oracle
Sign up for courses here:
http://www.suite101.com/suiteu/default.cfm/416752