I don't think such a duplicity (to keep data in the database and some of rows in the text file) is the way to go.

Try to use SQL distinct commands (http://www.sqlobject.org/SelectResults.html#distinct) instead.

It will offer unique rows from the database to your audience.

Petr