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

Home -> Community -> Usenet -> c.d.o.server -> Re: Composite Primary key or 1 primary key column with all values

Re: Composite Primary key or 1 primary key column with all values

From: Marc <Marc-Weinstock_at_si.rr.com>
Date: Sat, 10 Aug 2002 23:24:57 GMT
Message-ID: <dhh59.197157$QD2.44499344@twister.nyc.rr.com>


I forgot to mention that I if I went with the 1 column approach, then I would have all 7 columns. 1 for the combined primary key and the other 6 columns separated out. The six will be kept so I can search on 1 particular value if needed and display the values would be easier. The 1 primary key will be only used to lookup the particular row. I would probably have a trigger to perform the concatenation. I will never use substring on the primary key column. BTW, this is a dss system, no transactions. Speed is the issue.

"Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message news:2gmalu0e57o31kea7dgj8f2p238jugaq21_at_4ax.com...
> On 10 Aug 2002 10:49:55 -0700, matezuka_at_yahoo.com (kopek) wrote:
>
> >I can not understand why in the world you want to create 6 columns in
> >a table when one would suffice. A simple select.. from.. where col1=?
> >will turn into select..from.. where col1=?, col2=? etc., etc... The
> >SQL will take longer to parse. How much better speed-wise a single
> >column design is over the 6-columns one, I can not say. The 6-column
> >one will not out-perform the single-column one, that I can say.
> >
> That single column is a column made up several columns. If he uses
> your advice he will be forced to use substr's all over the place to
> get that information out.
> Strictly following your advice any table can be made up of one single
> column, because multiple columns will take longer to parse.
> This observation is simply completely incorrect and your advice
> unprofessional.
>
> Regards
>
>
> Sybrand Bakker, Senior Oracle DBA
>
> To reply remove -verwijderdit from my e-mail address
Received on Sat Aug 10 2002 - 18:24:57 CDT

Original text of this message

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