title: MySQL Migration Script Help
body: <p>I am working on a site that lists a directory of various restaurants, and currently in the process of switching to a newer CMS. The problem I have is that both CMSes represent the restaurant data differently.</p>
  
  <h2>Old CMS</h2>
  
  <p>A Cross Reference Database so it may list an entry for an example like this:</p>
  
  <p>ID / FieldID / ItemID / data</p>
  
  <p>3 / 1 / 6 / 123 Foo Street</p>
  
  <p>4 / 2 / 6 / Bar</p>
  
  <p>One reference table that reference FieldID 1 as street, FieldID 2 as City.</p>
  
  <p>Another reference table that references ItemID 6 as Delicious Restaurant.</p>
  
  <h2>New CMS</h2>
  
  <p>The way the database is on the new CMS when I set up a sample listing, is all direct rows, no cross referencing. So instead the data for the same restaurant will be:</p>
  
  <p>ID / Name / Street / City</p>
  
  <p>3 / Delicious Restaurant / 123 Foo Street / Bar</p>
  
  <hr>
  
  <p>There are about 2,000 restaurant listings so it's not a HUGE amount in terms of SQL row data size, but of course enough to not even consider re-entering all the restaurant listings by hand.</p>
  
  <p>I have a few ideas, but it would be extremely dirty and take a while, and I'm not a MySQL expert so I am here for some ideas how I should tackle it.</p>
  
  <p>Many thanks to those who can help.</p>