建模产品定价结构

发布于 2024-10-13 03:19:26 字数 502 浏览 4 评论 0原文

我需要为我们的一些产品建立一个相当复杂的定价结构模型。

今天我们手动查找价格。这是一张图片,其中解释了我们今天使用的“矩阵”:示例模型(抱歉链接 - 但我不允许发布图像,因为我刚刚开设了帐户。)

现在我需要将此模型传输到 RDBMS 系统(SQL Server 2008 R2)。查找价格时的切入点是类别,然后是年度间隔,最后是取决于我们在此订单上销售的产品数量的间隔。查询的结果应该是两个价格。

您对如何建模有什么建议吗?我正在考虑将其建模为具有 RowNumberCellNumberCellValue 的矩阵。但随后我需要另一个表格来描述每个单元格中包含的内容(通过引用行和单元格编号)。如果这样做,我可以将价格包含在该描述表中。但这似乎不是最好的解决方案。

您对如何以最佳方式建模此问题有任何提示/解决方案吗?

I need to model a rather complex pricing structure for some of our products.

Today we lookup the prices manually. Here's a picture with explanations of the "matrix" that we use today: Sample model (sorry for the link - but I'm not allowed to post images because I've just opened my account.)

Now I need to transfer this model to a RDBMS system (SQL Server 2008 R2). The entry point when looking up a price is the Category, then the yearly interval and finally the interval depending on how many products we're selling on this order. The result of the query should be two prices.

Do you have any suggestions on how to model this? I was thinking of modeling it as a matrix with a RowNumber, CellNumber and a CellValue. But then I need another table for describing what is contained in each cell (by referencing the row and cell numbers). If doing that, I could just include the prices in that description table. But that doesn't seem like the best solution.

Do you have any hints/solutions on how to model this problem the best way?

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

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

发布评论

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

评论(1

峩卟喜欢 2024-10-20 03:19:26

我想我会做这样的事情:

SQL Schema

类别被分成自己的表。
价格表中的每一行均由销售和发货范围的类别和起点唯一标识。我认为您不需要在表中指定终点(因为范围的终点应该是下一个范围的起点减一)。

编辑:使用此模型,您需要在价格表中为类别、销售数量间隔和发货数量间隔的每个组合添加一行,但现在我想不出更简单的方法。

I think I would make something like this:

SQL Schema

Categories are separated into its own table.
Each row in the price table are uniquely identified by the category and starting point of the sold and shipped range. I don't think you would need to specify ending point in the table (since the end point of a range should be the starting point of the next range minus one).

Edit: With this model, you will need to add a row in the Prices table for each combination of category, units sold-interval and units shipped-interval, but right now I can't think of an easier way.

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