The "lookup" databases for discovery tags, and planets/systems that you personally have scanned before, will be as simple as possible, to make it as quick as possible.
Every star system has a unique number. Every star and planet in the star system has a unique number. Every CMDR has a unique number. So the discovery lookup database will be just a series of numbers, which the game then converts into planet IDs and CMDR names.
This has two corollaries.
1. It's why FD have always said they can add planets onto the end of a star system, but can't easily add planets "in between" pre-existing planets. EG: they added Sedna, Persephone and friends to Sol system without any dramas - just tack on extra planets to the list of Sol system - but they couldn't add Ceres, in between Mars and Jupiter, in the same update. Because Mars is planet number 7, and Jupiter is planet number 8, and they can't create a new planet number 8 without deleting the old one.
2. It's why changing the galaxy would change everybody's discovery tags. Suppose star system number 487039847562 is a red dwarf with nine planets, all Tagged by various CMDRs, and planet 1 is an ammonia world tagged by me. A minor edit to the stellar forge has a ripple effect that results in star system 487039847562 becoming a K class star in a slightly different location, with only six planets, and the first planet is now an ELW; it would mean that I "unfairly" get given a tag on an ELW which I don't deserve; it's entirely likely that I never find out that I have an extra ELW to my name. Meanwhile, those last three planets get "deleted" and their tags become invisible.