问题描述
我听了许多播客.我经常听到在数据库或业务对象建模的上下文中.这似乎是某些事情的典型例子.我就是不知道.
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".
由于地球上几乎所有企业都对其订单,购买和/或销售都有类似的记录,因此,只要有数据库,它就一直是父子关系(或主从关系)的规范化现实数据示例.已经存在(已有40多年了).
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).
它可能看起来像这样:
May Weller, 14-FEB-2011
qty Product Price
1 Hose, 50ft $21.99
4 Sprinkler $33.78
1 Gum $ 1.10
Total $56.87
通常将其存储为[ORDERS]表中的一行,并另存为[Order-Lines]表中的三行,所有这些行都指向[ORDERS]中的父行.可能看起来像这样:
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]表:
OrderID: 14028
Customer: May Weller
OrderDate: 14-FEB-2011
[订单行]表:
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).
这篇关于什么是“订单行"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!