Well, again, it will come down to using XPath filters.
Let's say you have two tables:
Table A (Company):
CompanyID
CompanyName
Address
City
Etc
Table B (Contact):
ContactID
CompanyID
FirstName
LastName
Etc
In your form, you have a drop down that is bound to your main data source field of Company. The drop down uses Table A for the values - the display is CompanyName, the value is CompanyID.
You can have rules on that main data source field, Company. It will have the selected CompanyID in it. You can then set other fields based on that, using XPath filters (basically telling InfoPath, for example, select the Address from Table A where the CompanyID field is equal to the main data source Company field).
You could also have a drop down that allows the user to select the correct Contact. That drop down could be filtered based on the selected CompanyID - that is, the rows from Table B that would be displayed would be those where the Table B CompanyID is equal to the Company field in your main data source.
Sorry if this is sort of vague, but without actually seeing your form & data structures, I'm sort of guessing at what you might be asking. :-)