具有标准/定制配置和单独销售组件的可配置产品的数据库设计

发布于 2024-10-17 17:34:52 字数 697 浏览 0 评论 0原文

我在为可配置产品设计数据库时遇到问题。 我的应用程序要求是从也可以单独销售的组件创建可配置的产品。

可以单独销售的产品具有共同的属性,例如尺寸和颜色,可以在销售单个产品时进行组合

还有标准配置和定制配置,需要保存在数据库中

例如:- 床是一个配置产品,它由底座、中床垫、上床垫、床腿、床头板组成... 除基础之外的所有这些组件都可以单独出售 共同的属性是尺寸和颜色,而中床垫还有一个附加属性坚固

到目前为止我想出的设计是......
Component_Master
comp_id
补偿名称
comp_desc
补偿类型
sell_alone

Component_Attribute_Header
attrib_id
comp_id
attrib_name

Component_Attribute_Details
attrib_id
attrib_details_id
value

现在我陷入了标准配置和定制配置的设计表中,

任何人都可以帮助我进行此设计吗?

提前致谢,
Siddhesh Tawde

I have a problem designing database for a configurable product.
My application requirement is to create a configurable product from components which can also be sold separately

The products which can be sold alone have common attributes like size and color which can be combined while selling single

Also there is a Standard configuration and customized configuration which needs to be saved in database

Eg:- Bed being a configured product, it consist of Base, Middle-Mattress, Top-Mattress, Legs, Headboard...
All of this components except Base can be sold individually
There common attributes are size and color while Middle-Mattress has got a additional attribute as Firmness

The design that i came up with till now is ....
Component_Master
comp_id
comp_name
comp_desc
comp_type
sold_alone

Component_Attribute_Header
attrib_id
comp_id
attrib_name

Component_Attribute_Details
attrib_id
attrib_details_id
value

Now I am stuck at designing tables for standard configuration and customized configuration

Can anyone please help me with this design

Thanks in advance,
Siddhesh Tawde

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小矜持 2024-10-24 17:34:52

您可以这样做:

一件产品应该有一个或多个部件。每个部分都应该有一个或多个属性。装配是零件和产品之间的一种关系,一个零件应该位于不同的产品中,而一个产品应该有一个或多个零件。根据您的规格自定义字段。

    tbl_product
    -----------
    prd_id:long PK
    prd_name:string
    prd_date:datetime

    tbl_parts
    ---------------
    comp_id:long PK
    comp_name:string
    comp_description:string
    comp_type:long
    comp_sold_alone:boolean
    comp_can_assembly:boolean

tbl_assemblies
--------------
    ass_id:long PK
    ass_description:string
    ass_date:datetime
    ass_product:long FK (tbl_products)
    ass_part_id:long FK (tbl_parts)

tbl_attributes
--------------
    atrb_id:long PK
    atrb_description:string
    atrb_part:long FK (tbl_parts)

You may do this:

A product should have one or more parts. Each part should have one or more attributes. An assembly is a relation between parts and a product, once one part should be in different products, and one product should have one or more prarts. Customize the fields according to your specifications.

    tbl_product
    -----------
    prd_id:long PK
    prd_name:string
    prd_date:datetime

    tbl_parts
    ---------------
    comp_id:long PK
    comp_name:string
    comp_description:string
    comp_type:long
    comp_sold_alone:boolean
    comp_can_assembly:boolean

tbl_assemblies
--------------
    ass_id:long PK
    ass_description:string
    ass_date:datetime
    ass_product:long FK (tbl_products)
    ass_part_id:long FK (tbl_parts)

tbl_attributes
--------------
    atrb_id:long PK
    atrb_description:string
    atrb_part:long FK (tbl_parts)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文