3 Replies Latest reply on Apr 1, 2013 11:43 PM by anoop.sharma

    Help understanding database structure and Tableau

    Brad Mills

      Okay I'm having a problem with cross joins, so my number of records is never right. I'm considering of going to the extreme of making a whole new database that's more sanitized and only has one table and one row for each ID. I guess I shouldn't have to, but I feel like things would go so much smoother.


      Not a database wizard, please help me understand this.


      I have a single ID field shared across 6 or 7 tables.


      One table in particular might have up to ten rows that share an ID. That table also has some other columns, with a field that has the numbers 1, 2, 3 etc corresponding to placement if there's multiple ID's.


      So would I really have to make new fields like ID_1 ID_2 ID_3 and other related data from the rows REL_1 REL_2 REL_3 I'd be combining into one row, etc? Seems kinda stupid since I already have this stuff.. But the table joins and multiple ID's makes for the cross-join problem where I'm getting way too many records.


      What's the advice here?

        • 1. Re: Help understanding database structure and Tableau
          Dana Withers

          Hi Brad,


          It may be worthwhile getting a little bit more insight into your actual data structure.

          If you have one ID shared across several tables, you should just be able to connect those tables on that ID without getting cross joins. If you make the correct (inner) join, you should end up with a query that has single distinct rows anyway. What sort of database do you have? You could even get a view on your database that has the connection logic in it and just connect Tableau to that view.

          I'm not sure what you mean with the ID_1, ID_2, etc, but it would seem unlikely that cross-joins is what you are after as this does not connect tables based on IDs but simply makes any possible connection.

          Could you go into more detail as to your data structure and what you're trying to achieve?



          1 of 1 people found this helpful
          • 2. Re: Help understanding database structure and Tableau
            Brad Mills

            Okay the way I have it setup in Tableau is like this. (Oracle).


            I add one table, then connect all other tables to it with inner joins on the common ID field. I just add tables until they're all listed.


            My problem is my number of records balloons in size, so I can't get accurate results for anything with sums or counts.


            I believe this is because some tables have the ID field listed numerous times, each on its own row.

            • 3. Re: Help understanding database structure and Tableau

              May be doing some normalization can help.


              Here's a guide for understanding normalization: