Hi! First-time poster. I have no programming experience and I’m teaching myself SQL on Codecademy, planning on going through the Data Science path. I have a question about how to create hierarchical data sets.
EXAMPLE: Say you were making a database showing which people have held positions in which government agencies. If someone was, say, the head of the F.B.I., you’d want to indicate that the F.B.I. is part of the Justice Department which is in turn part of the Executive Branch.
I get how you’d make, say, a People table and an Agency table. I think I get how you could do something like create, I don’t know, a Sub-Agency table to show the agencies within a larger agency. But I’m confused about how you’d do this on a larger scale, so that you’d have a vast array of agencies nested within other agencies. (And I chose government agencies because there isn’t much consistency about what’s at what level; it’s not like every Department is made up of Agencies which are made up of Bureaus which are made up of Offices, so there aren’t really common threads.)
So… how would that work? Thanks! (And I hope I’m asking this the right way and in the right place!)