By modern standards, 3GB really isn't particularly large, but, even so, the final on-disk database wouldn't have to be that big.
Celestia doesn't have to use textual STC files. Multiple STC files can be translated into a single binary "stars.dat" which would have much better load-time performance. The 2M stars.dat available from the MotherLode is about 40MB, loads reasonably quickly (< 10 sec on my computer with an SSD system disk) and has good runtime performance. A little more patience would be needed for a 20M 400MB stars.dat to load, but I dunno what Celestia's resulting runtime performance would be. It'd depend on a lot of factors, but I suspect it'd still be acceptable.
I mention multiple STC files because it'd probably be easiest to use different algorithms to generate the different regions comprising a typical spiral galaxy, including the core, thin disk, thick disk and halo.