I've done a bit of reading on data modeling recently and have a question about roles that an entity may play.
Consider a simple case where you've got a Company, and a Company can be a Supplier, Customer, Distributor, etc. or a combination of these roles. So company X might be both a Supplier and a Customer.
Down at the data level you might have a table for CompanyS and then tables for SupplierS, CustomerS, etc that reference the Company table. At least I think this is how it might be represented.
Ok, so somewhere up in application-land you've got classes for CustomerS and SupplierS and so on. Each would be composed of a Company, and then whatever else is special about that particular class.
That's all ok and makes sense to me as long as we're only working with one entity class at a time. What if we want to start with a Company and see what roles it's playing? So in an application I might pull up a Company and see that it is a Supplier and a Distributor.
Now there are a few different ways I can think of to do this, but I feel that because this problem domain is so old that there must be some tried and true patterns for modeling these concepts.
Thus what I am in search of here are common strategies or patterns for modeling entity roles up at the application level. Specific reference material about this particular subject would be greatly appreciated (be it blogs or books or whatever).