One way of doing it would be like this.This is just my idea you can change it according to your requirements once you get he list of objects.
1>Create a 2 java class .First class will have all the attributes from the first table.Second java class will have all the attributes from the second table. When you retrieve the data from the first result set for every row you will create an object of class 1 and fill the attributes with the values from the result set. and add the object to a list.so by the end of the result set you will have a list of class 1 objects where each object is a row of the table.Similarly you can do the samething for the class 2.
2>By the end of this you will be having two list one list with the objects of class 1 and the second list with the objects of class 2.

3>You can traverse through both the list and compare the family,product and version if they are same then you can get the filenames from the other correspondign object and print the pattern will be something like this

It is up to you to decide how you want to present the data to the user
If the requirement is to display the tables values exactly as they are then "YES" you have to display family and product even though it has duplicates

At the end,
You can write a for loop for all the sets of (Keys) data you want to display... and get corresponding key values hash.get(key); hash1.get(key); hash2.get(key); hash3.get(key); hash4.get(key); from the hash and display them inside a table....