List:General Discussion« Previous MessageNext Message »
From:ChoiSaehoon Date:March 27 2009 1:56pm
Subject:Data structure for matching for company data
View as plain text  
I'm a complete newbie, so please feel free to help me here!

 

I simplified my problem as below:
1. Thousands of companies (i.e. company names)
2. 200 industries. Each company has tree-type(?) industry info. (Industry, Sub-industry.
Say, each industry has 10 sub-industry information. (10X20))

 

The problem is one company can have 1,2,3... or 15 industries and/or sub-industries... (as
in a real-life case)

 

What would be a smart way create tables for this situation? (both company and industry
must be searchable)

 

(One rough thought (after having studying MySQL for 2 weeks now) is create 3 tables of 
1. company (3 cols) - company id(pk), company name
2. industry (3 cols) - industry id(pk), industry, sub-industry
3. matching table (3 cols?) - match id(pk), company id(fk), industry id(fk)...? But, one
company can have more than 1 industry info! Ah... Then, if that's the case, different
match id & same company id & different industry id??)

I'm stuck here! :( 

 

Any general advice would be appreciated... :)

_________________________________________________________________
강력해진 보안성, 아웃룩을 닮아 편리해진 기능들로 무장한 Windows
Live Hotmail! 지금 로그인해 보세요!
http://www.hotmail.com
Thread
Data structure for matching for company dataChoiSaehoon27 Mar
  • Re: Data structure for matching for company dataPeter Brawley27 Mar
    • Re: Data structure for matching for company dataArthur Fuller28 Mar
      • RE: Data structure for matching for company dataChoiSaehoon31 Mar
    • RE: Data structure for matching for company dataChoiSaehoon31 Mar
      • Re: Data structure for matching for company dataPeter Brawley31 Mar
        • Re: Data structure for matching for company dataAndy Shellam31 Mar