PCI devices
Vendors
The top level of hierarchy is a vendor list.
Each vendor has a 2-byte long id, stored in database as 4 hexadecimal digits (with lowercase letters).
They can be browsed here.
Devices
Each vendor contains a list of its devices.
Each device in the list has a 2-byte long id, stored the same way as vendor id (4 hexadecimal letters).
Subsystems
A device can consist of more sub-systems.
Each sub-system has 4-byte long id, stored as 8 hexadecimal letters, split in the middle by a space (for example 1234 abcd could be a sub-system id).
The first quad of digits is considered a vendor id (from the same list of vendors). The vendor of the sub-system can be different than vendor of the device.
See also
You can have a look at PCI device classes.