How to handle relational data in drupal?

Hi -

I'm new to drupal and coming from a heavy focus on relational databases.   I'm struggling to do things that I would find easy in a traditional database.

Here's an example of the kind of thing I'd like to solve.

I have a content type called "product image"

I want to classify those images by vendor.  I also have the vendor's address.

So I create another content type "vendor" and give it appropriate fields including state.

Then I create a node reference field in the product image type, referencing a vendor.

All seems well to this point.

But now I want to be able to create a view (views2, drupal 6.x) that shows the images along with the vendor's state.   No dice.  While I can see that state field when defining a view, it shows blank on the resulting view.

Ideally I'd like the user to pick the state and have the images come up that are classified with vendors in that state.    No dice there either.  It seems that the views module only knows how to show & filter the fields from the product image content type, not from the related vendor.

Any suggestions?  This seems so basic to me, so I'd imagine drupal can do it, but I've googled in vain for even basic information to get me started.  I'm wondering if I have to modify the SQL somehow a la http://drupal.org/node/409808, but that seems to be much harder than I'd expect for such a simple thing.


Any push in the right direction would be helpful.
savageanneAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

oliverpoldenCommented:
use this module to create an automatic taxonomy from your vendors, add the taxonomy to your 'product image' and create the relationship using that: http://drupal.org/project/nat
0
savageanneAuthor Commented:
Thanks for the suggestion.   I don't fully understand what you are suggesting.  How could I use this to use the vendor's state?  (not the vendor's name)  Of course there could be more than just name and state.  The vendor could have lots of properties that would be of interest.    
0
oliverpoldenCommented:
You use the taxonomy to create the relationship and then you can use all the fields you want from the vendor
0
savageanneAuthor Commented:
Sorry about abandoning this question.  I've just gotten back to this project and realized that I had not fully understood the options in views.  You can set a "relationship" in a view which provides the ability to establish these kinds of connections.  I didn't get a chance to experiment with the module you suggested.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Drupal

From novice to tech pro — start learning today.