Maybe you know the PCI ID database. It allows submitting names for PCI ID numbers, discussing them and administrating. The PCI IDs are kept in hierarchical structure.
If you need something similar, you can just take the code and customize it. For very similar applications, only writing a new address classes should be enough (actually, it supports having many address types in the same database, you can have them all together).
You can download current „stable“ version (well, what stable means is somehow undefined, this one is the version used on the web few days after publishing, with most visible bugs probably fixed) here.
However, since you probably want some changes, you better use the development version from git repository ‒ git://git.ucw.cz/pciids.git. You can then get all the bugfixes right away and keep your history in your local repository.
There is no documentation for this, so you either want to read the code or ask for help. However, this is a small overview of what lives where:
If you are not sure, how difficult it would be to bend this code to do what you need, just ask.