In short, there was so little information left from that encounter that the Enterprise crew didn't know the name of the aliens or anything significant about them. All that would be in any database would be "unknown alien species" (or something close to that) and what few facts they had about them.
In the 24th century, the Ferengi weren't entirely unknown. When Picard and the Enterprise-D first encounter the Ferengi, Picard asks Data to synthesize a report on the Ferengi and there is enough information for Data to put together a general idea of what they are like. That means the Ferengi had been encountered enough for there to be stories about encounters (including exaggerations) and enough factual reports for Data to build up an idea of what they're like.
I don't remember the name of the episode, but if you watch it, it's easy to see why so little information of the Ferengi could be gleaned from that encounter.