Re: Re: Data duplication in databases

From: Date: Wed, 29 Aug 2001 21:27:29 +0000
Subject: Re: Re: Data duplication in databases
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-65111@lists.php.net to get a copy of this message
The only problem is detecting that the data is identical in the first place. If I have to do a select with 7 AND statements to see if I have identical data, I'm going to take a huge performance hit. I was hoping this had been done at a very low level, but it doesn't look like it. Maybe it's just as unrealistic at a low level, but I could swear I had heard of this feature before. Oh well. J PS. I didn't mention this before, but a link table (ie a relational structure) is not possible in my situation. On Wednesday, August 29, 2001, at 01:47 PM, james wrote:
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
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.general (#65111) next »