[kw-pm] a philosophical question about hashes

Greg.Fenton@sybase.com Greg.Fenton at sybase.com
Thu Jun 16 07:51:39 PDT 2005

[Sorry if this is a dupe....our IT organization cannot keep our domain 
name straight so some posts have been bouncing]

To me, this is a "normalization" question, akin to relational database 
normalization.  The ultimate goal of any database design is to be as 
normalized as possible, reducing duplication and segmenting data into 
tightly focused groupings.

However, there are certainly patterns in relational design where 
over-normalization leads to poor performance or unwieldly complex code 
(queries).  To that end, there are definitely times where denormalization 
makes complete sense (reality vs. purism).

Greg Fenton
Consultant, Solution Services
iAnywhere Solutions

"Robert P. J. Day" <rpjday at mindspring.com> 
Sent by: kw-pm-bounces at pm.org
06/15/2005 07:30 PM

Christopher Calzonetti <elbie at trig.net>
KW Perl list <kw-pm at mail.pm.org>
Re: [kw-pm] a philosophical question about hashes

On Wed, 15 Jun 2005, Christopher Calzonetti wrote:

> On Wed, Jun 15, 2005 at 04:33:39PM -0400, Robert P. J. Day wrote:
> >
> >   not so much a perl question as a software design question that just
> > happens to be associated with perl -- is it considered bad form to
> > create a hash in which each element's key is also one of its fields in
> > the corresponding value?
> I can see at least one reason for doing this:
> Say there are a bunch of different unique identifiers for a record,
> and you point to a reference that contains the full record.
> In your example, you might also have a hash based on driver's
> license number, and you want to use the same records.  Well then,
> the record would need the SSN/SIN, as it wouldn't be the index.

i'd thought of that as well.  i *can* see the value in the
duplication, i was just wondering if anyone had strong opinions on
this either way.

kw-pm mailing list
kw-pm at pm.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/kw-pm/attachments/20050616/b5fa3311/attachment.html

More information about the kw-pm mailing list