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

Home -> Community -> Mailing Lists -> Oracle-L -> Re:Usage of Number type for table columns

Re:Usage of Number type for table columns

From: <dgoulet_at_vicr.com>
Date: Wed, 15 Aug 2001 09:55:08 -0700
Message-ID: <F001.0036B578.20010815081625@fatcity.com>

Rao,

    The boss is somewhat right, but are you absolutely certain that the current program interface to the data will remain forever? What is the likelihood of someone having to "correct" the data via SQL*Plus or some other method where the restrictions will have no effect. The main reason of applying the constraints at the database level is that is the lowest level of granularity for the data and consequently the one place where one can be absolutely certain that business rules get applied irregardless of where the data comes from.

Dick Goulet

____________________Reply Separator____________________
Author: "Rao; Maheswara" <Maheswara.Rao_at_Sungardp3.com>
Date:       8/15/2001 7:41 AM

List,

In one of our applications, my boss wants to define all the numeric columns as NUMBER or leave it as floating point. He wants to define all the tables like this wherever numeric column is defined in the table.

Example:

Location_ID NUMBER

We know, from our application character, that this location_ID would never cross beyond 3 digits. Also, we know that this specific column does not require any digits to the right of the decimal point. ---> (This column is only an example).

He does not want to specify any precision or scale for the number type columns. His point is --- Oracle would use only that much space depending on the actual number of digits he enters into the column. Thus, he is not wasting any space. Also, he says, during the beginning of application, we might not know the maximum limits for number column. Hence, leaving them as floating point ( Location_ID NUMBER), gives him flexibility and he need not change the number column precision or scale during the entire life cycle of the application. He says, it is upto the application program (JAVA/EJB) to control and check the maximum length permissible against a column depending on the business rules.

I do not know whether this is a correct approach. Intuitively, I feel that this approach is not correct. However, I am not able to come up with any valid reason to negate his approach.

Please inform whether the approach is correct or having any problems, from your experience.

Thanks,

Rao

Maheswara.Rao_at_Sungardp3.com
DBA
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Rao, Maheswara
  INET: Maheswara.Rao_at_Sungardp3.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: dgoulet_at_vicr.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Aug 15 2001 - 11:55:08 CDT

Original text of this message

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