database table design, different property values will have different prices

Source: Internet
Author: User

May I ask the great gods, how this structure is implemented, is currently the following practice:
There is a property name table Goods_attr
There is a property value table Goods_attr_value
However, different attribute value choices will have different prices,
This number of values determine a value of the situation really did not meet, how to solve?

Reply content:

May I ask the great gods, how this structure is implemented, is currently the following practice:
There is a property name table Goods_attr
There is a property value table Goods_attr_value
However, different attribute value choices will have different prices,
This number of values determine a value of the situation really did not meet, how to solve?

http://www.widlabs.com/article/item-unlimited-specifications.html Reference

Example:
There is a product: id=10021
Available in two sizes: color, size
Then the value of the specification is stored in addition to itself, and other fields that need to meet the business logic, such as inventory and price
For example, the table of specification values might look like this:

10021 Black M 100.55 100
10021 Black L 200.55 123
10021 Yellow M 300.55 333
10021 Yellow L 400.55 222
....

The content of the property name table is not: freight, version, color, package these?

Multi-spec Price list!

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.