Data Warehouse : Chapter 3 Inventory

Data Warehouse : Chapter 3 Inventory

Introduction to the Value Chain

– The value chain identifies the natural, logical flow of an organization’s primary activities
– The primary objective of most analytic decision support systems is to monitor the performance results of key processes.

Inventory Models

the inventory periodic snapshot : ขอมูลยอดวัสดุคงคลัง ณ ช่วงเวลาที่ตรวจนับได้ ซึ่งเราดูได้จาก rows ใน fact table โดยมันจะแสดง series ของ data layers ใน dimensional model
– In the third model, we’ll touch on the inventory accumulating snapshot, where we build one fact table row for each product delivery and update the row until the product leaves the warehouse.

Inventory Periodic Snapshot
– การควบคุมปริมาณของสินค้าในคงคลังเป็นหัวใจหลักที่มีผลสำคัญต่อการได้กำไร โดยการที่มีีการวางสินค้าในสถานที่และเวลาที่เหมาะสมจะช่วยในการลดการสต๊อก สินค้า และลดเวลาในการขนส่ง
– ลองใช้ four-step process ในการออกแบบ dimensional models
1. business process :  the retail store inventory
2. granularity : atomic level of detail provided by the operational inventory system
3. dimensions :  date, product, and store
4. fact : quantity on hand
– ในส่วนของ dimension หลักๆ ก็มีความคล้ายกับเรื่องของ  retail store sales แ่ต่อาจจะมีการเพิ่มเติมบางส่วนได้เช่น product dimension อาจจะเพิ่มในส่วนของ จำนวนสินค้าที่มีการสั่งน้อยที่สุดโดยสมมุติในให้เป็นค่าคงที่และคำอธิบาย ที่เป็นพื้นฐานสำหรับสินค้าแต่ละชิ้นที่อยู่ในคงคลัง

Semiadditive Facts
– Semi-additive Facts : fact ที่ sum ไม่ได้ทุก dimension เช่นพวก account balance, อุณหภูมิ โดยอาจจะใช้ Average ช่วย
– All measures that record a static level are inherently nonadditive across the date dimension and possibly other dimensions.
– A proper inventory application must isolate the date constraint and retrieve its cardinality alone

Enhanced Inventory Facts
– ในการวิเคราะห์คงคลังสินค้าส่วนใหญ่แล้ว การพิจารณาเฉพาะจำนวนสินค้าอาจจะยังไม่เพียงพอ จำนวนสินค้าถูกใช้ในการรวมกันของ additional facts ที่ใช้ในการวัดความเร็วของความเคลื่อนที่ของคลังสินค้า และ การพัฒนาหน่วยในการวัดที่น่าสนใจอื่นๆ เช่น จำนวนของวันในการขาย, รายได้รวมที่ได้จากคงคลัง  gross margin return on inventory (GMROI, pronounced “jem-roy”)
– GMROI = total quantity sold x (value at latest selling price – value at cost) / daily average quantity on hand x value at the latest selling price
– การมีค่า GMROI สูงหมายถึงว่ามีการเคลื่อนไหวของสินค้าในคงคลังเร็ว และมีกา่รทำรายได้สูง ซึ่ง GMROI เป็นมาตรฐานการวัดที่ถูกใช้ในการวิเคราะห์คงคลังเพื่อการตัดสินใจในการลงทุน สต๊อกจำนวนสินค้าของบริษัท
– เราจะไม่ใ่ส่ GMROI ใน fact table เนื่องจากว่ามันไม่ additive (ไม่สามารถ sum ได้) แต่เราสามารถคำนวนหา GMROI ได้จาก คอลัมน์อื่นใน fact table

Inventory Transactions
– อีกทางหนึ่งในการ model ของan inventory business process คือ การบันทึกทุกๆ transaction ที่ส่งผลต่อคลังสินค้า
– แต่ละ inventory transaction จะระบุ วันที่, สินค้า, warehouse, ผู้จำหน่าย, ชนิดของ transaction
– The transaction-level fact table มีส่วนช่วยในการวัดความถี่และเวลาของ specific transaction types

Inventory Accumulating Snapshot
– accumulating snapshot เป็นหนึ่งในโมเดลของคลังสินค้า โดยที่เราจะวางหนึ่งแถวใน fact table สำหรับการขนส่งสินค้าทางเรือของสินค้าพิเศษไปยัง warehouse
– The accumulating snapshot model is only possible if we can reliably distinguish products delivered in one shipment from those delivered at a later time.
– หลักความจริงเบื้องหลังของ accumulating snapshot fact table คือ การจัดการอัพเดตสถานะของสินค้าที่ขนส่งทางเรืือผ่านทาง milestones แต่ละ fact table row จะถูกอัพเดตจนกระทั่งสินค้าออกไปจาก warehouse
– Accumulating snapshots are the third major type of fact table.

Value Chain Integration

– IT organization also benefits from integration because it allows the organization to better leverage scarce resources and gain efficiencies through the use of reusable components.
–  drill across, is straightforward if the dimension table attributes are identical.

Data Warehouse Bus Architecture

– bus เป็นโครงสร้างพื้นฐานสำหรับการเชื่อมต่อสิ่งต่างๆ และเป็นที่ทุกๆสิ่งได้พลัีงงานมา โดยในคอมพิวเตอร์ bus เป็น standard interface specification ที่ทำให้เราสามารถต่อกับ disk drive, CD-ROM หรือการ์ดต่างๆได้
– ในความหมายทาง data warehouse การแยก data mart สามารถ implement โดยกลุ่มที่แตกต่างกันในเวลาที่แตกต่างกัน ซึ่ง data marts ที่แยกออกมาก็สามารถจะเชื่อมต่อกันได้และใช้ด้วยกันได้ถ้ามันยึดมาตรฐาน เดียวกัน
– The bus architecture ขึ้นกับเทคโนโลยีและ database platform

Data Warehouse Bus Matrix

–  data warehouse bus matrix เป็นเครื่องมือที่ใช้ในการสร้าง, ยืนยันด้วยเอกสาร และเชื่อมต่อกับ  bus architecture
– matrix rows เปลี่ยนเป็น data mart โดยขึ้นกับกิจกรรมหลักขององค์กร โดยเราเริ่มจากการลิสต์ data mart ที่ได้มาจาก single primary source system หรือที่รู้จักกันในนามของ first-level data marts
– ถ้ามีแหล่งข้อมูล หรือกระบวณการต่างกันก็ควรจะแยกออกมาเป็น row ใหม่
– คอลัมน์ใน matrix เป็นตัวแทนของ dimension ที่เป็นพื้นฐานที่ใช้ในธุรกิจ
– matrix เป็นเครื่องมือที่ดีสำหรับทั้งการวางแผนและการติดต่อ ถึงแม้ว่ามันจะเป็นความสัมพันธ์โดยตรงที่แสดงผ่าน rowsและ columns  มันช่วยให้เราเห็นได้อย่างชัดเจนว่า dimension ไหนที่ต้องสนใจเป็นพิเศษ
– การสร้าง data warehouse bus matrix เป็นหนึ่งใน up-front deliverables ที่สำคัญที่สุดของdata warehouse implementation

Conformed Dimensions
– A conformed dimension คือ เราสามารถประกาศ dimension table เพียงอันเดียว และแบ่งให้ data mart อื่นมาใช้ งานได้
– Dimension table จะไม่เหมือนกันถ้า attribute ถูกลาเบลต่างกันหรือมีค่าต่างกัน ซึ่งถ้าลูกค้าหรือสินค้าถูกจัดด้วยวิธีการต่างกันแล้วทั้ง data mart ที่แยกมาจะไม่สามารถใช้ร่วมกันได้หรือ ถ้ามีการพยายามใช้ร่วมกันจะทำให้เกิดผลที่ผิดพลาด
– Most conformed dimensions are defined naturally at the most granular level
possible.
– Roll-up dimensions conform to the base-level atomic dimension if they are a strict subset of that atomic dimension.
–  conformed dimension subsetting เกิดขึ้นเมื่อมี dimension 2 dimensionใดๆ มีระดับของรายละเอียดเหมือนกัน แต่มีเพียงอันเดียวที่เป็นตัวแทนของ subset of rows
– The dimension authority has responsibility for defining, maintaining, and publishing a particular dimension or its subsets to all the data mart clients who need it.

Conformed Facts
โดย ทั่วไป fact table จะไม่มีการคัดลอกอย่างชัดเจนใน multiple data marts แต่อย่างไรก็ตาม ถ้า facts มีอยู่ในหลายทีการนิยามสำหรับ fact จะต้องเหมือนกัน ถ้ามันระบุถึงสิ่งเดียวกัน ถ้ามันถูกลาเบลเหมือนกันแล้วมันต้องการการนิยามใน dimension context เดียวกัน และมีหน่วยในการวัดเหมือนกัน
– บางครั้ง fact มี หน่วยของการวัดโดยทั่วไปในหนึ่ง fact table และมีหน่วยของการวัดอื่นใน fact table ตารางอื่น

Leave a comment