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: Constrainting NUMBER

Re: Constrainting NUMBER

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Thu, 26 May 2005 08:20:51 +0200
Message-ID: <hlqa9157a1khvcsrtggpffpnk73d8trhh8@4ax.com>


On Thu, 26 May 2005 14:02:15 +0800, "as" <none_at_asgmeail.com> wrote:

>
>"DA Morgan" <damorgan_at_psoug.org> ??? news:1117085511.454471_at_yasure ???...
>>
>> Best practice is to enforce data integrity in everything you do.
>> That means define your data types after careful consideration and
>> study of the data they will be asked to hold.
>>
>> The alternative is to do the following:
>> CREATE TABLE bad_practice (
>> person_id NUMBER,
>> first_name VARCHAR2(4000),
>> last_name VARCHAR2(4000),
>> address VARCHAR2(4000),
>> socsecno VARCHAR2(4000));
>>
>> does that make any sense? A Social Security Number of up to 4000
>> bytes?
>> --
>Well, putting unconstrainted VARCHAR2 is definitely a bad practice -
>consider how sqlplus format the column. But for NUMBER, I do come across a
>textbook suggesting not to constraint it unless there is some good reasons -
>however the reasons are not clearly explained. (If you want to know, it is
>Oreilly's Java Programming with Oracle JDBC by Donald Bales Chap 10.2.)
>
>

Time to dump the book, I guess.

--
Sybrand Bakker, Senior Oracle DBA
Received on Thu May 26 2005 - 01:20:51 CDT

Original text of this message

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