1 Reply Latest reply on Feb 18, 2015 6:17 AM by philmodjunk

    Automating a join table build



      Automating a join table build


      I need to join 2 single tables, States to Cities, xJoin would be the combined location to be referenced later.

      States >-----------xJoin--------<Cities

      The Cities table has 40+ entries and States has only ~6 records. Is there a faster, more automated way to build up xJoin rather than manually creating a new record in xJoin and typing in the matching id numbers of States and Cities to create linkage?

        • 1. Re: Automating a join table build

          Do you really need the join table at all? Join tables are used to facilitate many to many relationships, but while many cities can be located in a single state, the reverse is not true, so before we look at automating the process it's good to be sure that you actually need that table.

          Note: When setting up a database, your design should never ever require users to type in matching ID's--whether they are fields in a join table or not.