MySQL Forums
Forum List  »  Newbie

Re: Iterating through SQL table
Posted by: Peter Brawley
Date: April 26, 2009 04:44PM

> hashvalue (int, Primary Key) | DocIDs (text) | count (int)
>DocIDs MUST be a text, because it contains all docIDs separated by ";"

Oy, that's a disastrous table design mistake. It breaks a basic rule of relational databases; atomicity, one value per cell. For this table to be queryable, `docIDs` needs to be projected to a child table in which each row has its matching `hashvalue` from this table ,and that individual docID. Then your query becomes trivially easy, and so does processing it.

PB

Options: ReplyQuote


Subject
Written By
Posted
K R
April 18, 2009 01:10PM
K R
April 26, 2009 01:06PM
Re: Iterating through SQL table
April 26, 2009 04:44PM
K R
April 26, 2009 11:14PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.