title: Simple decomposition of MySQL table
body: <p>I'm not a great expert in the field of databases and MySQL in particular - studying, so I bit confused in terminology.</p>
  
  <p>I have an internal database organization, which has got a new job.
  One HUGE table products, categories, and heaps of different properties.
  The properties in this table are repeated many times (ie, non-unique).
  Each position - a single row of the table.</p>
  
  <p>It is necessary to divide it into several small ones (do decomposition) to select a title, category, and properties in separate tables with unique content.</p>
  
  <p>Most likely it should be clear what I want, but still give structure.</p>
  
  <p><strong>1. The structure of an existing database</strong></p>
  
  <p>MAIN TABLE</p>
  
  <pre><code>id int (10) unsigned NOT NULL AUTO_INCREMENT - (the unique ID of the position of the goods)
  prod_name varchar (255) NOT NULL - the name of the position (non-unique)
  prod_cat varchar (64) NOT NULL - the name of the category (non-unique)
  prod_prop01 varchar (64) NOT NULL - name svoystva1 (non-unique)
  prod_prop02 varchar (64) NOT NULL - name svoystva2 (non-unique)
  </code></pre>
  
  <p><strong>2. I would like to get structure like this</strong></p>
  
  <p>MAIN TABLE</p>
  
  <pre><code>id int (10) unsigned NOT NULL AUTO_INCREMENT - (the unique ID of the position of the goods)
  prod_name int (10) - to the entry ID (unique)
  prod_cat int (10) - PH category (unique)
  prod_prop01 int (10) - Foreign svoystva1 (unique)
  prod_prop02 int (10) - Foreign svoystva2 (unique)
  </code></pre>
  
  <p>TABLE OF POSITIONS NAMES</p>
  
  <pre><code>id int (10) unsigned NOT NULL AUTO_INCREMENT - (unique ID names)
  name varchar (64) NOT NULL - the name of the position (unikalnoe!)
  </code></pre>
  
  <p><strong>And the same for the table - category Prop01 and Prop02.</strong></p>
  
  <p>Can this be done only with the help of MySQL?
  If not, then tell me a general algorithm for solving this problem.
  Thank you for your attention to this simple task.</p>