It doesn't have a "database" per se, it has associations between various words (actually words broken into "tokens"). For a topic like you're talking about it would have learned various associations between all the relevant words and will regurgitate different associations based on the words present in the prompt, other words generator, random chance etc (which is why it can "make stuff up"). It's the same thing with the supposed "reference" it quoted. This MAY be were it learned that particular association, but it may not be; it's again another association with a group of words.
It doesn't have a "database" per se, it has associations between various words (actually words broken into "tokens"). For a topic like you're talking about it would have learned various associations between all the relevant words and will regurgitate different associations based on the words present in the prompt, other words generator, random chance etc (which is why it can "make stuff up"). It's the same thing with the supposed "reference" it quoted. This MAY be were it learned that particular association, but it may not be; it's again another association with a group of words.
Not all that different from a Chinese student.