sql - MySQL Migration Script Help -
I am working on a site that lists a directory of different restaurants, and currently a new CMS The problem with the switching process is that both CMSs represent different restaurant data.
Old CMS
A cross reference database so that it can list entry for an example like this:
ID / FieldID / Item ID / Data
3/1/6/123 Fu Street
4/2/6 / bar
A reference table that refers to FieldID 1 as the road, Field ID 2 as the city.
Another reference table, which references item ID 6 6 as a tasty restaurant.
New CMS
The way in which database I create a sample list happens on the new CMS, these are all straight lines, no cross refractioning. Therefore, the data of the same restaurant will be instead:
ID / name / road / city
3 / delicious restaurant / 123fu street / bar
There are about 2,000 restaurant listings, so this is not large volume in terms of SQL line data size, but certainly not enough to re-enter the listing of all the restaurants by hand.
I have some ideas, but it will be very dirty and will take some time, and I am not a MySQL expert, so I am here for some ideas how to handle it.
Many thanks to those who can help
To get something from, you can connect several times with the data table:
Please select the old names in the new one. Itamd, Old Name. Name, OldStatsdata, Old Man. Old names contain old data and old ones, old names on old names. Itam = Old Street. ItamID Initial Intervals include old data as old, old names are included on the IitemID = oldCities item IDID, old places are in the form of roads on older places. FieldID = roads. Field. FieldID and roads field Name = 'Old' fields are attached as 'Street' joining the inner cities. Fields on Cities Field id = citiesfield Fields and Citiesfield .Name = 'City']
You did not name all the tables, so I made some names. If you have more fields that you need to remove, then this type of query should be trivial to expand.
Comments
Post a Comment