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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Primary Key

Re: Primary Key

From: Mabel Triguis <mabel_triguis_at_bluewin.ch>
Date: 1998/01/06
Message-ID: <01bd1b1b$9c810510$ba0bbac3@m3bj1>#1/1

Jim Anderson <janderson_at_ci.lincoln.ne.us> wrote in article <34B27718.808C9A10_at_ci.lincoln.ne.us>...
> Is there any problem with using the - character as part of the primary
> key? We are designing a database with a table that could have a primary
> key of XX-XX-XXX-XXX-XXX or XXXXXXXXXXXXX. The first form is more
> readable, but I am curious if anyone has had problems with this.
>
> Thanks,
> Jim Anderson
>
>

You will not have any problem if any 'X' is not null. In the case that 'X' coul be null, how are you going to fill it? like: AA-CC-BBB-BBB- - -
you can have problems with the last spaces, and when you query it is going to be a nigthmare!.
Consider also that depending of the size of your database you are using 4 characters more.
Why not just format the input/output more readable? Received on Tue Jan 06 1998 - 00:00:00 CST

Original text of this message

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