Re: Data duplication in databases

From: Date: Wed, 29 Aug 2001 19:47:05 +0000
Subject: Re: Data duplication in databases
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-65093@lists.php.net to get a copy of this message
Julian, I am not aware of any databases smart enough to decide to create references for rows whose data is identical to an existing row. If the duplicate data is creating resource issues, there's a couple things that you can do to eliminate the duplicate data. Probably the easiest would be, in the case of varchar data, to add a column for a row number. If the data to be inserted is identical to data in a row that's already in the database, an encoded reference to the row number of the row with the original data could be stored. That way, you're just storing the reference to the original data. Example: RowNum ProdNum Revision Description_varchar 455333 10 1 XXXYYYXXXYYYXXXYYYXXXYYYZZZYYYYXXXX 873245 10 2 <<-455333->> 934532 10 3 <<-455333->> If you don't want to do the encoding thing, you could create a "link" table to accomplish the same thing. HTH, James Potts "Julian Wood" <woodj@ucalgary.ca> wrote in message news:200108282123.ZZ047421@mserve2.acs.ucalgary.ca... > > Hi, > > Don't know if this is the best place to ask, but I thought I would give > it a try. > > I was just wondering if anyone knows of any databases which deal with > data duplication (at a low level). Say I have two (or ten) identical > records, does anyone know of any databases which would only keep one > copy of the data and use references for the other records? Does this > work if 7 out of the 8 columns (for instance) are identical (ie the > primary key is different but everything else is identical). Do such db's > exist? Or do they all do this? Or am I just dreaming? > > J > -- > Julian Wood > > Programmer/Analyst > University of Calgary

« previous php.general (#65093) next »