Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> การเขียนโปรแกรม

การนำ Data Warehouse ไปใช้งาน (Implementations) มีอะไรบ้าง?

Data Warehouses มีปริมาณข้อมูลมหาศาล OLAP Servers ต้องการให้ Decision Support Queries ตอบสนองภายในวินาที จึงจำเป็นต้องมี Cube Computation Techniques, Access Techniques, และ Query Processing Techniques ที่มีประสิทธิภาพสูง

การคำนวณ Data Cubes อย่างมีประสิทธิภาพ (Efficient Computation of Data Cubes)

หัวใจของ Multidimensional Data Analysis คือ การคำนวณ Aggregations อย่างมีประสิทธิภาพข้ามหลายชุดของ Dimensions ในภาษา SQL Aggregations เหล่านี้เรียกว่า Group-by's แต่ละ Group-by แสดงได้โดย Cuboid โดยชุดของ Group-by's สร้าง Lattice ของ Cuboids กำหนด Data Cube

มี 3 ตัวเลือกสำหรับ Data Cube Materialization จาก Base Cuboid:

  • No Materialization: ไม่ Pre-compute Non-base Cuboids ใดๆ นำไปสู่การคำนวณ Multidimensional Aggregates ระหว่างรัน (On the fly) ซึ่งอาจช้ามาก
  • Full Materialization: Pre-compute Cuboids ทั้งหมด Lattice ที่คำนวณแล้ว เรียกว่า Full Cube ตัวเลือกนี้มักต้องการ Memory Space มากมาย
  • Partial Materialization: เลือกคำนวณ Subset ที่เหมาะสมของ Cuboids ทั้งหมด หรือคำนวณ Subset ของ Cube ที่มีเฉพาะ Cells ที่ผ่านเกณฑ์ User-specified เช่น Tuple Count ของแต่ละ Cell ตาม Threshold

การจัดทำดัชนีข้อมูล OLAP (Indexing OLAP Data)

เพื่อรองรับการเข้าถึงข้อมูลที่มีประสิทธิภาพ ระบบ DW บางระบบให้ Index Structures และ Materialized Views (ใช้ Cuboids) วิธี Bitmap Indexing นิยมใน OLAP Products เพราะช่วย Fast Searching ใน Data Cubes Bitmap Index เป็นการแสดงทางเลือกของ Record ID (RID) List

ใน Bitmap Index สำหรับแอตทริบิวต์ที่กำหนด มี Bit Vector แยกต่างหาก Bv สำหรับแต่ละค่า v ใน Domain ของแอตทริบิวต์ หาก Domain มี n ค่า ต้องการ n bits ต่อ Entry ใน Bitmap Index (มี n Bit Vectors) หากแอตทริบิวต์มีค่า v สำหรับ Row ที่กำหนดในตารางข้อมูล Bit ที่แทนค่านั้นจะ Set เป็น 1 ใน Row ตรงกันของ Bitmap Index Bits อื่นๆ สำหรับ Row นั้น Set เป็น 0

การประมวลผลคิวรี่ OLAP อย่างมีประสิทธิภาพ (Efficient Processing of OLAP Queries)

เป้าหมายของ Materializing Cuboids และสร้าง OLAP Index Structures คือเร่ง Query Processing ใน Data Cubes

  • กำหนด Operations ที่ควรทำบน Cuboids ที่มีอยู่: รวมถึงการแปลง Selection, Projection, Roll-up (Group-by), Drill-down Operations ใน Query ให้เป็น SQL/OLAP Operations ที่สอดคล้อง ตัวอย่าง: Slicing และ Dicing Data Cube สอดคล้องกับ Selection และ Projection Operations บน Materialized Cuboid
  • กำหนด Materialized Cuboid(s) ที่ควรนำ Operations ไปใช้: ระบุ Materialized Cuboids ที่อาจใช้ตอบ Query ได้ Prune ชุดต่อไปด้วยความรู้ของ "Dominance" Relationships ระหว่าง Cuboids ประมาณค่าค่าใช้จ่ายของ Cuboids ที่เหลือ และเลือก Cuboid ที่มีต้นทุนต่ำสุด