高洛峰2017-04-17 16:40:42
Data structure and data search are done separately
1. Data structure:
Basic product information (name, manufacturer, price and other information, product type)
Product type table (mobile phones, tablets, home appliances, etc.)
Product attribute table ( Screen size, processor, etc.)
Process the correspondence between these information through association, which is more flexible, otherwise no matter how you design it, it will be either redundant or insufficient
2. Data search:
Use solr, sphinx and the like to create indexes (just build several indexes for several tables), and then read the manual to build your own query API