MySQL Forums
Forum List  »  Newbie

Re: Using a variable to create a table name
Posted by: Thomas Stieve
Date: October 26, 2017 05:11PM

Sorry if I'm not explaining clearly. Let me start from the beginning.

I have 269 tables, one per Wikipedia language. Within each language table are edits from different countries. For example, for the title "David Bowie" in the English table, there are edits from Germany, U.S., Britain, etc. In the German table, there are edits to the German article "David Bowie" in Germany, Austria, etc. Each one of these edits is its own record. I have linked the title in each language to the equivalent English title if there is one.

For the final product that I'm going to analyze for my dissertation (I'm in Geography), I need to do two things: 1) get a list of articles per country of articles found only in that country, 2) get a list of the 100 titles that were edited in the most countries.

What I originally planned for the data processing was to use tables for all this processing. Yes, it does sound crazy. That's why I wanted to reach out to people who know MySQL better, so I can streamline this. I am starting to think:

1. I need a table or whatever for each country of what titles are edited there regardless of language. So, for the "Germany" table, I need to get that "David Bowie" edit from the English table along with all the different titles edited in all the different languages which were edited in Germany. I'm thinking now I can use a join with the country as a primary key from each language. The purpose of this is to analyze Wikipedian articles that are localized only in one country.

2. I need a table for the world of the 100 titles that were edited in the most countries. The primary key would be the English title. I can join to a master world table, starting with a copy of the English table. I can join each language table to this master table using the English title primary key, not joining the titles without one.

If you have any ideas that are better than this, I'll gladly listen. I am very grateful for your time and effort.

Tom

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.