什么是“订单行”? [英] What is a "order line"?
问题描述
我经常在数据库或业务对象建模的上下文中听到订单行的表达形式。
这似乎是一些典型的例子。我只是不知道是什么。
那么什么是订单行?
它是指采购订单,通常由一个或多个线,称为订单行。
由于几乎每个业务部门的订单,采购和/或销售都有类似的记录,所以一直是父母子女的规范现实世界数据示例(或Master-Detail)关系,只要数据库已存在(超过四十年)。
可能如下所示:
May Weller,14-FEB-2011
数量产品价格
1软管,50ft $ 21.99
4喷头$ 33.78
1 Gum $ 1.10
总计$ 56.87
这通常将作为[ORDERS]表中的一行存储在[Order-Lines]表中的另外三行,全部返回到[ORDERS]中的父行。可能看起来像这样:
[ORDERS]表:
订单ID:14028
客户:May Weller
订单日期:14-FEB-2011
[OrderLines]表:
OrderLineID:223011 223012 223013
/ pre>
订单编号:14028 14028 14028
数量:1 4 1
产品:软管,50ft喷头胶
价格:21.99 33.78 1.10
(注意:是的,我知道这还没有完全规范化)。
I listen a number of podcasts.
Often I hear the expression "Order line" in the context of database or business object modelling.
It seems to be the canonical example of something. I just don't know what.
So what is an "order line"? What concept does it represent in a canonical example?
解决方案It refers to a "Purchase Order" which typically consists of one or more lines, called "Order Lines".
As almost every business on earth has some similar record of it's orders, purchases and/or sales, it has been the canonical real-world data example of a Parent-Child (or Master-Detail) relationship for as long as databases have existed (well over forty years).
It might look like this:
May Weller, 14-FEB-2011 qty Product Price 1 Hose, 50ft $21.99 4 Sprinkler $33.78 1 Gum $ 1.10 Total $56.87
This would typically be stored as one row in an [ORDERS] table and three additional rows in an [Order-Lines] table, that all point back to the parent row in [ORDERS]. Which could look something like this:
[ORDERS] Table:
OrderID: 14028 Customer: May Weller OrderDate: 14-FEB-2011
[OrderLines] Table:
OrderLineID: 223011 223012 223013 OrderID: 14028 14028 14028 quantity: 1 4 1 Product: Hose, 50ft Sprinkler Gum Price: 21.99 33.78 1.10
(NOTE: yes, I know that this is not fully normalized yet).
这篇关于什么是“订单行”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!