7 Replies Latest reply on Feb 25, 2017 5:35 AM by kabetz

    3 Tables - 1 a bridge - loading data to all

    kabetz

      If I have 3 tables. Students; Classes; Sign Ups and Signs Ups is a Bridge Table holding the prime of Students and Classes how do I upload a csv file that would load all three tables? Thanks.

       

      The data in the csv file is new as in the students and the classes do not have a student id nor class id in the Student and Classes table.

       

      Thanks

       

      Message was edited by: Alec Bancroft Added an attachment to further the explanation.

        • 1. Re: 3 Tables - 1 a bridge - loading data to all
          philmodjunk

          If you need the import to create new records in all three tables, import the file thee times with a different table as the target each time and mapping fields as needed each import. Enable the auto-enter option to get IDS generated in the student and class tables. Import into the join table last and use lookups based on relationships to additional occurrences of the other two tables that match records by name to copy over IDS.

           

          BUT please note that this assumes unique names for classes and students. If you get two students with exactly the same name, you will have a problem. How you would resolve that would depend on what, if anything in your data would enable you to tell one student from another if their names are not unique.

          1 of 1 people found this helpful
          • 2. Re: 3 Tables - 1 a bridge - loading data to all
            philmodjunk

            Oh yes, you'd use unique values/validate always to prevent duplicate records in the class table. For the students table, the same issue of duplicate names occurs. You might have to import into an intermediate table and process the data for duplicate names before importing again into students. How you would resolve that depends on what data is present in that CSV file.

             

            I am answering by by phone and thus am not able to check that attached file to see if it includes a sample of the CSV data or not.

            • 3. Re: 3 Tables - 1 a bridge - loading data to all
              kabetz

              Hi Thanks for that.

               

              I've loaded the csv file into the domains table.

              I've loaded the csv file into the image table.

               

              The domain table and the image table will always be unique values.

               

              When I set the look up the records in the Join table come up blank.

               

              I've attached the screenshots.

              • 4. Re: 3 Tables - 1 a bridge - loading data to all
                kabetz

                Hi the data will never duplicate in the domain or image table it will always be unique.

                • 5. Re: 3 Tables - 1 a bridge - loading data to all
                  kabetz

                  Hi again,

                   

                  Just noticed you're answering by phone and can't see the attachments.

                   

                  Do I set the look up in the bridge table or do I set the look up in both the Students and Classes tables?

                   

                  Thanks.

                  • 6. Re: 3 Tables - 1 a bridge - loading data to all
                    philmodjunk

                    Import into the join table last and use lookups based on relationships to additional occurrences of the other two tables that match records by name to copy over IDS.

                    Note the bold face statement. What I am describing requires that you open Manage | Database and make new table occurrence boxes for your student and courses tables so that you can link them to the join (bridge) table by name instead of ID since the ID is notbeing imported. You then set up the ID's to look up from these name based relationships.

                     

                    Not sure how "courses and students" is consistent with domains and images. Seems like your data is not consistent with your original description of it.

                     

                    How can a number be an "im_name"?

                     

                    I cannot, BTW, find a way to open that "pages" document on my windows machine and thus can't tell what might be in it.

                    • 7. Re: 3 Tables - 1 a bridge - loading data to all
                      kabetz

                      Thanks Phil,

                       

                      I was using the wrong keys to make the relationship. Thanks for taking the time to answer this question.