不同类别不同字段怎么实现?

WBOY
Release: 2016-06-13 13:42:35
Original
943 people have browsed it

不同类别不同字段如何实现??
1. 如阿里巴巴发布产品时,当选择不同的类别时,对应的不同的产品字段发布, 这个逻辑关系是如何实现的, 数据表是怎么建立的,会的请帮忙!谢了

------解决方案--------------------
这里的关键在怎么建立产品字段表,按照需求你需要竖向建立。
你可以这样建。

id :自增id
category : 产品类别
name : 产品字段

其中一个一个产品类别可以对应多个产品字段。
------解决方案--------------------
需求分析啊!建表你如果没有思路的话就一步步的来啊!
求人不如求自己!
你先发各个对象的属性还有各自的关系吧关系图做出来!
然后按照3个基本的范式进行建表就可以了!
------解决方案--------------------
EAV模式,
1 产品基本信息表;
2 产品分类与字段关系表;
3 所有字段表;
4 产品字段值表;

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!