Re: Data structure for matching for company data

2009-03-31 Thread Andy Shellam
You can use this structure with MyISAM tables. It will work fine except you won't have the advantage of database-level enforcement of foreign key constraints--do it with code. Or use InnoDB tables (enable/load the innobase plugin.) -- MySQL General Mailing List For list archives:

RE: Data structure for matching for company data

2009-03-30 Thread ChoiSaehoon
: Re: Data structure for matching for company data Choi 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)...? Yes, you've got it. In the matching

RE: Data structure for matching for company data

2009-03-30 Thread ChoiSaehoon
Thanks for the resource! Arthur. SIC seems to be great for most industries, but not for high-tech industries. (e.g. it doesn't have Internet or software etc) Still a great tip, though. Thanks again! :) Date: Fri, 27 Mar 2009 19:13:51 -0500 Subject: Re: Data structure for matching

Re: Data structure for matching for company data

2009-03-30 Thread Peter Brawley
constraints--do it with code. PB ChoiSaehoon wrote: Thanks, PB. Date: Fri, 27 Mar 2009 09:54:47 -0500 From: peter.braw...@earthlink.net To: saeho...@hotmail.com CC: mysql@lists.mysql.com Subject: Re: Data structure for matching for company data Choi 1. company (3 cols

Data structure for matching for company data

2009-03-27 Thread ChoiSaehoon
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))

Re: Data structure for matching for company data

2009-03-27 Thread Peter Brawley
Choi 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)...? Yes, you've got it. In the matching (usually called bridging) table, any company or industry

Re: Data structure for matching for company data

2009-03-27 Thread Arthur Fuller
My esteemed friend, partner and co-author has laid it out perfectly for you. Just follow the instructions table-wise. One thing that may not be obvious from Peter's prescription is that you need to enter a bunch of rows into the industry table first, so that the foreign keys will make sense in