Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
636 views
in Technique[技术] by (71.8m points)

data modeling - What is an "order line"?

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...