Xây Dựng Kho Dữ Liệu Với Ví Dụ Trong SQL Server

Chuyên khảo phân tích Building a data warehouse with examples in sql server pdfdrive, đánh giá các khía cạnh quan trọng, đề xuất hướng nghiên cứu tiếp theo.

Trường đại học

Apress

Chuyên ngành

Data Warehousing

Người đăng

Ẩn danh

Thể loại

book

2008

541
4
0

Phí lưu trữ

135 Point

Mục lục chi tiết

1. CHAPTER 1: Introduction to Data Warehousing

1.1. What Is a Data Warehouse?

1.2. Dimensional Data Store

1.3. Normalized Data Store

1.4. Other Analytical Activities

1.5. Updated in Batches

1.6. Data Warehousing Today

1.7. Customer Relationship Management

1.8. Master Data Management (MDM)

1.9. Customer Data Integration

1.10. Future Trends in Data Warehousing

1.11. Service-Oriented Architecture (SOA)

1.12. Real-Time Data Warehouse

2. CHAPTER 2: Data Warehouse Architecture

2.1. Data Flow Architecture

2.2. Federated Data Warehouse

3. CHAPTER 3: Data Warehouse Development Methodology

4. CHAPTER 4: Functional and Nonfunctional Requirements

4.1. Identifying Business Areas

4.2. Understanding Business Operations

4.3. Defining Functional Requirements

4.4. Defining Nonfunctional Requirements

4.5. Conducting a Data Feasibility Study

5. CHAPTER 5: Data Modeling

5.1. Designing the Dimensional Data Store

5.2. Slowly Changing Dimension

5.3. Product, Customer, and Store Dimensions

5.4. Subscription Sales Data Mart

5.5. Supplier Performance Data Mart

5.6. CRM Data Marts

5.7. Source System Mapping

5.8. Designing the Normalized Data Store

6. CHAPTER 6: Physical Database Design

6.1. Creating DDS Database Structure

6.2. Creating the Normalized Data Store

7. CHAPTER 7: Data Extraction

7.1. Introduction to ETL

7.2. ETL Approaches and Architecture

7.3. Extracting Relational Databases

7.4. Whole Table Every Time

7.5. Testing Data Leaks

7.6. Extracting File Systems

7.7. Extracting Other Source Types

7.8. Extracting Data Using SSIS

7.9. Memorizing the Last Extraction Timestamp

7.10. Extracting from Files

8. CHAPTER 8: Populating the Data Warehouse

8.1. Using SSIS to Populate NDS

8.2. Upsert Using SQL and Lookup

8.3. Practical Tips on SSIS

8.4. Populating DDS Dimension Tables

8.5. Populating DDS Fact Tables

8.6. Batches, Mini-batches, and Near Real-Time ETL

8.7. Pushing the Data In

9. CHAPTER 9: Assuring Data Quality

9.1. Data Quality Process

9.2. Data Cleansing and Matching

9.3. Cross-checking with External Sources

9.4. Data Quality Rules

9.5. Action: Reject, Allow, Fix

9.6. Logging and Auditing

9.7. Data Quality Reports and Notifications

9.8. Metadata in Data Warehousing

9.9. Data Definition and Mapping Metadata

9.10. Data Structure Metadata

9.11. Source System Metadata

9.12. ETL Process Metadata

9.13. Data Quality Metadata

11. CHAPTER 11: Building Reports

11.1. Data Warehouse Reports

11.2. When to Use Reports and When Not to Use Them

11.3. Grouping, Sorting, and Filtering

11.4. Multidimensional Database Reports

11.5. Managing Reports

11.6. Managing Report Security

11.7. Managing Report Subscriptions

11.8. Managing Report Execution

12. CHAPTER 12: Multidimensional Database

12.1. What a Multidimensional Database Is

12.2. Online Analytical Processing

12.3. Creating a Multidimensional Database

12.4. Processing a Multidimensional Database

12.5. Querying a Multidimensional Database

12.6. Administering a Multidimensional Database

12.7. Multidimensional Database Security

12.8. Backup and Restore

13. CHAPTER 13: Using Data Warehouse for Business Intelligence

13.1. Business Intelligence Reports

13.2. Business Intelligence Analytics

13.3. Business Intelligence Data Mining

13.4. Business Intelligence Dashboards

13.5. Business Intelligence Alerts

13.6. Business Intelligence Portal

14. CHAPTER 14: Using Data Warehouse for Customer Relationship Management

14.1. Single Customer View

14.2. Delivery and Response Data

14.3. Customer Loyalty Scheme

15. CHAPTER 15: Other Data Warehouse Usage

15.1. Customer Data Integration

15.2. Search in Data Warehousing

16. CHAPTER 16: Testing Your Data Warehouse

16.1. Data Warehouse ETL Testing

16.2. User Acceptance Testing

16.3. End-to-End Testing

16.4. Migrating to Production

17. CHAPTER 17: Data Warehouse Administration

17.1. Monitoring Data Warehouse ETL

17.2. Monitoring Data Quality

17.3. Making Schema Changes

APPENDIX: Normalization Rules

Tóm tắt

I. Tổng Quan Về Xây Dựng Kho Dữ Liệu Trong SQL Server

Xây dựng kho dữ liệu là một quá trình quan trọng trong việc quản lý và phân tích dữ liệu. Kho dữ liệu giúp tổ chức lưu trữ và truy xuất dữ liệu một cách hiệu quả. Trong bối cảnh SQL Server, việc xây dựng kho dữ liệu không chỉ đơn thuần là lưu trữ mà còn bao gồm việc tối ưu hóa truy vấn và đảm bảo chất lượng dữ liệu.

1.1. Định Nghĩa Kho Dữ Liệu

Kho dữ liệu là một hệ thống lưu trữ dữ liệu được thiết kế để hỗ trợ phân tích và báo cáo. Nó thường chứa dữ liệu từ nhiều nguồn khác nhau và được tổ chức theo cách dễ dàng truy xuất.

1.2. Lợi Ích Của Kho Dữ Liệu

Kho dữ liệu giúp cải thiện khả năng ra quyết định thông qua việc cung cấp thông tin chính xác và kịp thời. Nó cũng hỗ trợ trong việc phân tích dữ liệu lớn và tạo ra các báo cáo chi tiết.

II. Thách Thức Trong Việc Xây Dựng Kho Dữ Liệu

Việc xây dựng kho dữ liệu gặp phải nhiều thách thức, từ việc thu thập dữ liệu đến việc đảm bảo chất lượng dữ liệu. Các vấn đề như dữ liệu không đồng nhất và thiếu tính chính xác có thể gây khó khăn trong quá trình phân tích.

2.1. Vấn Đề Về Chất Lượng Dữ Liệu

Chất lượng dữ liệu là một yếu tố quan trọng trong kho dữ liệu. Dữ liệu không chính xác hoặc không đầy đủ có thể dẫn đến quyết định sai lầm.

2.2. Khó Khăn Trong Việc Tích Hợp Dữ Liệu

Tích hợp dữ liệu từ nhiều nguồn khác nhau có thể gặp khó khăn do sự khác biệt trong định dạng và cấu trúc dữ liệu.

III. Phương Pháp Xây Dựng Kho Dữ Liệu Hiệu Quả

Để xây dựng kho dữ liệu hiệu quả, cần áp dụng các phương pháp và công cụ phù hợp. Việc sử dụng SQL Server cho phép tối ưu hóa quy trình ETL và quản lý dữ liệu một cách hiệu quả.

3.1. Quy Trình ETL Trong SQL Server

ETL (Extract, Transform, Load) là quy trình quan trọng trong việc xây dựng kho dữ liệu. SQL Server cung cấp các công cụ như SSIS để thực hiện quy trình này một cách hiệu quả.

3.2. Thiết Kế Cơ Sở Dữ Liệu

Thiết kế cơ sở dữ liệu là bước quan trọng trong việc xây dựng kho dữ liệu. Cần xác định các bảng dữ liệu, mối quan hệ và chỉ mục để tối ưu hóa hiệu suất.

IV. Ứng Dụng Thực Tiễn Của Kho Dữ Liệu

Kho dữ liệu có nhiều ứng dụng thực tiễn trong các lĩnh vực như phân tích kinh doanh, quản lý khách hàng và báo cáo. Việc sử dụng kho dữ liệu giúp tổ chức đưa ra quyết định dựa trên dữ liệu chính xác.

4.1. Phân Tích Kinh Doanh

Kho dữ liệu hỗ trợ phân tích kinh doanh bằng cách cung cấp thông tin chi tiết về xu hướng và hành vi của khách hàng.

4.2. Quản Lý Khách Hàng

Kho dữ liệu giúp tổ chức quản lý thông tin khách hàng một cách hiệu quả, từ đó cải thiện dịch vụ và tăng cường mối quan hệ với khách hàng.

V. Kết Luận Về Tương Lai Của Kho Dữ Liệu

Tương lai của kho dữ liệu sẽ tiếp tục phát triển với sự gia tăng của dữ liệu lớn và công nghệ phân tích. Việc áp dụng các công nghệ mới như AI và machine learning sẽ giúp tối ưu hóa quy trình phân tích dữ liệu.

5.1. Xu Hướng Công Nghệ Mới

Công nghệ mới như AI và machine learning sẽ giúp cải thiện khả năng phân tích và dự đoán trong kho dữ liệu.

5.2. Tương Lai Của Quản Lý Dữ Liệu

Quản lý dữ liệu sẽ trở nên quan trọng hơn bao giờ hết khi các tổ chức cần phải xử lý và phân tích một lượng lớn dữ liệu từ nhiều nguồn khác nhau.

16/07/2025

Trích đoạn nội dung tài liệu

 CYAN  YELLOW MAGENTA BLACK PANTONE 123 C Books for professionals by professionals ® The EXPERT’s VOIce ® in SQL Server Companion eBook Available Building a Data Warehouse: With Examples in SQL Server Building a Data Warehouse With Examples in SQL Server Dear Reader, This book contains essential topics of data warehousing that everyone embarking on a data warehousing journey will need to understand in order to build a data Building a warehouse. It covers dimensional modeling, data extraction from source systems, dimension and fact table population, data quality, and database design. It also explains practical data warehousing applications such as business intelligence, analytic applications, and customer relationship management. All in all, the book covers the whole spectrum of data warehousing from start to finish.

Data Warehouse I wrote this book to help people with a basic knowledge of database systems who want to take their first step into data warehousing. People who are familiar with databases such as DBAs and developers who have never built a data ware- house will benefit the most from this book. IT students and self-learners will also benefit. In addition, BI and data warehousing professionals will be interested in checking out the practical examples, code, techniques, and architectures described in the book.

Throughout this book, we will be building a data warehouse using the Amadeus Entertainment case study, an entertainment retailer specializing in music, films, and audio books. We will use Microsoft SQL Server 2005 and 2008 to build the data warehouse and BI applications. You will gain experience designing and building various components of a data warehouse, including the architecture, With Examples in SQL Server data model, physical databases (using SQL Server), ETL (using SSIS), BI reports (using SSRS), OLAP cubes (using SSAS), and data mining (using SSAS). I wish you great success in your data warehousing journey.

Sincerely, Vincent Rainardi Related Titles Companion eBook See last page for details on $10 eBook version Vincent Rainardi Rainardi ISBN-13: 978-1-59059-931-0 ISBN-10: 1-59059-931-4 SOURCE CODE ONLINE 90000 www.com Shelve in Microsoft: SQL Server User level: Intermediate–Advanced 9 781590 599310 this print for content only—size & color not accurate 7" x 9-1/4" / CASEBOUND / MALLOY 9314fmfinal.qxd 11/15/07 1:37 PM Page i Building a Data Warehouse With Examples in SQL Server Vincent Rainardi 9314fmfinal.qxd 11/15/07 1:37 PM Page ii Building a Data Warehouse: With Examples in SQL Server Copyright © 2008 by Vincent Rainardi All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-59059-931-0 ISBN-10 (pbk): 1-59059-931-4 ISBN-13 (electronic): 978-1-4302-0527-2 ISBN-10 (electronic): 1-4302-0527-X Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.

Lead Editor: Jeffrey Pepper Technical Reviewers: Bill Hamilton and Asif Sayed Editorial Board: Steve Anglin, Ewan Buckingham, Tony Campbell, Gary Cornell, Jonathan Gennick, Jason Gilmore, Kevin Goff, Jonathan Hassell, Matthew Moodie, Joseph Ottinger, Jeffrey Pepper, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh Senior Project Manager: Tracy Brown Collins Copy Editor: Kim Wimpsett Associate Production Director: Kari Brooks-Copony Production Editor: Kelly Winquist Compositor: Linda Weidemann, Wolf Creek Press Proofreader: Linda Marousek Indexer: Ron Strauss Artist: April Milne Cover Designer: Kurt Krames Manufacturing Director: Tom Debolski Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders-ny@springer-sbm.com, or visit http://www. For information on translations, please contact Apress directly at 2855 Telegraph Avenue, Suite 600, Berkeley, CA 94705. Phone 510-549-5930, fax 510-549-5939, e-mail info@apress.com, or visit http:// www.

The information in this book is distributed on an “as is” basis, without warranty. Although every pre- caution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. The source code for this book is available to readers at http://www.qxd 11/15/07 1:37 PM Page iii For my lovely wife, Ivana.qxd 11/15/07 1:37 PM Page iv 9314fmfinal.qxd 11/15/07 1:37 PM Page v Contents at a Glance About the Author. xv ■CHAPTER 1 Introduction to Data Warehousing.

1 ■CHAPTER 2 Data Warehouse Architecture. 29 ■CHAPTER 3 Data Warehouse Development Methodology. 49 ■CHAPTER 4 Functional and Nonfunctional Requirements. 61 ■CHAPTER 5 Data Modeling.

71 ■CHAPTER 6 Physical Database Design. 113 ■CHAPTER 7 Data Extraction. 173 ■CHAPTER 8 Populating the Data Warehouse. 215 ■CHAPTER 9 Assuring Data Quality.

301 ■CHAPTER 11 Building Reports. 329 ■CHAPTER 12 Multidimensional Database. 377 ■CHAPTER 13 Using Data Warehouse for Business Intelligence. 411 ■CHAPTER 14 Using Data Warehouse for Customer Relationship Management.

441 ■CHAPTER 15 Other Data Warehouse Usage. 467 ■CHAPTER 16 Testing Your Data Warehouse. 477 ■CHAPTER 17 Data Warehouse Administration. 491 ■APPENDIX Normalization Rules .qxd 11/15/07 1:37 PM Page vi 9314fmfinal.qxd 11/15/07 1:37 PM Page vii Contents About the Author.

xv ■CHAPTER 1 Introduction to Data Warehousing. 1 What Is a Data Warehouse?. 6 Dimensional Data Store. 7 Normalized Data Store.

12 Other Analytical Activities. 14 Updated in Batches. 16 Data Warehousing Today. 17 Customer Relationship Management.

19 Master Data Management (MDM). 20 Customer Data Integration. 23 Future Trends in Data Warehousing. 25 Service-Oriented Architecture (SOA).

26 Real-Time Data Warehouse .qxd 11/15/07 1:37 PM Page viii viii ■CONTENTS ■CHAPTER 2 Data Warehouse Architecture. 29 Data Flow Architecture. 38 Federated Data Warehouse. 47 ■CHAPTER 3 Data Warehouse Development Methodology.

59 ■CHAPTER 4 Functional and Nonfunctional Requirements. 61 Identifying Business Areas. 61 Understanding Business Operations. 62 Defining Functional Requirements.

63 Defining Nonfunctional Requirements. 65 Conducting a Data Feasibility Study. 70 ■CHAPTER 5 Data Modeling. 71 Designing the Dimensional Data Store.

77 Slowly Changing Dimension. 80 Product, Customer, and Store Dimensions. 83 Subscription Sales Data Mart. 89 Supplier Performance Data Mart.

94 CRM Data Marts. 101 Source System Mapping. 102 Designing the Normalized Data Store .qxd 11/15/07 1:37 PM Page ix ■CONTENTS ix ■CHAPTER 6 Physical Database Design. 123 Creating DDS Database Structure.

128 Creating the Normalized Data Store. 171 ■CHAPTER 7 Data Extraction. 173 Introduction to ETL. 173 ETL Approaches and Architecture.

177 Extracting Relational Databases. 180 Whole Table Every Time. 186 Testing Data Leaks. 187 Extracting File Systems.

187 Extracting Other Source Types. 190 Extracting Data Using SSIS. 191 Memorizing the Last Extraction Timestamp. 200 Extracting from Files.

214 ■CHAPTER 8 Populating the Data Warehouse. 219 Using SSIS to Populate NDS. 228 Upsert Using SQL and Lookup. 242 Practical Tips on SSIS .qxd 11/15/07 1:37 PM Page x x ■CONTENTS Populating DDS Dimension Tables.

250 Populating DDS Fact Tables. 266 Batches, Mini-batches, and Near Real-Time ETL. 269 Pushing the Data In. 271 ■CHAPTER 9 Assuring Data Quality.

273 Data Quality Process. 274 Data Cleansing and Matching. 277 Cross-checking with External Sources. 290 Data Quality Rules.

291 Action: Reject, Allow, Fix. 293 Logging and Auditing. 296 Data Quality Reports and Notifications. 301 Metadata in Data Warehousing.

301 Data Definition and Mapping Metadata. 303 Data Structure Metadata. 308 Source System Metadata. 313 ETL Process Metadata.

318 Data Quality Metadata. 327 ■CHAPTER 11 Building Reports. 329 Data Warehouse Reports. 329 When to Use Reports and When Not to Use Them.

342 Grouping, Sorting, and Filtering. 357 Multidimensional Database Reports .qxd 11/15/07 1:37 PM Page xi ■CONTENTS xi Managing Reports. 370 Managing Report Security. 370 Managing Report Subscriptions.

372 Managing Report Execution. 375 ■CHAPTER 12 Multidimensional Database. 377 What a Multidimensional Database Is. 377 Online Analytical Processing.

380 Creating a Multidimensional Database. 381 Processing a Multidimensional Database. 388 Querying a Multidimensional Database. 394 Administering a Multidimensional Database.

396 Multidimensional Database Security. 399 Backup and Restore. 409 ■CHAPTER 13 Using Data Warehouse for Business Intelligence. 411 Business Intelligence Reports.

412 Business Intelligence Analytics. 413 Business Intelligence Data Mining. 416 Business Intelligence Dashboards. 432 Business Intelligence Alerts.

437 Business Intelligence Portal. 439 ■CHAPTER 14 Using Data Warehouse for Customer Relationship Management. 441 Single Customer View. 450 Delivery and Response Data.

464 Customer Loyalty Scheme .qxd 11/15/07 1:37 PM Page xii xii ■CONTENTS ■CHAPTER 15 Other Data Warehouse Usage. 467 Customer Data Integration. 470 Search in Data Warehousing. 476 ■CHAPTER 16 Testing Your Data Warehouse.

477 Data Warehouse ETL Testing. 485 User Acceptance Testing. 486 End-to-End Testing. 487 Migrating to Production.

489 ■CHAPTER 17 Data Warehouse Administration. 491 Monitoring Data Warehouse ETL. 492 Monitoring Data Quality. 499 Making Schema Changes.

503 ■APPENDIX Normalization Rules .qxd 11/15/07 1:37 PM Page xiii About the Author ■VINCENT RAINARDI is a data warehouse architect and developer with more than 12 years of experience in IT. He started working with data warehous- ing in 1996 when he was working for Accenture. He has been working with Microsoft SQL Server since 2000. He worked for Lastminute.com (part of the Travelocity group) until October 2007.

He now works as a data warehousing consultant in London specializing in SQL Server. He is a member of The Data Warehousing Institute (TDWI) and regularly writes data warehousing articles for SQLServerCentral.qxd 11/15/07 1:37 PM Page xiv 9314fmfinal.qxd 11/15/07 1:37 PM Page xv Preface F riends and colleagues who want to start learning data warehousing sometimes ask me to recommend a practical book about the subject matter. They are not new to the database world; most of them are either DBAs or developers/consultants, but they have never built a data warehouse. They want a book that is practical and aimed at beginners, one that contains all the basic essentials.

There are many data warehousing books on the market, but they usu- ally cover a specialized topic such as clickstream, ETL, dimensional modeling, data mining, OLAP, or project management and therefore a beginner would need to buy five to six books to understand the complete spectrum of data warehousing. Other books cover multiple aspects, but they are not as practical as they need to be, targeting executives and project managers instead of DBAs and developers. Because of that void, I took a pen (well, a laptop really) and spent a whole year writing in order to provide a practical, down-to-earth book containing all the essential subjects of building a data warehouse, with many examples and illustrations from projects that are easy to understand. The book can be used to build your first data warehouse straightaway; it cov- ers all aspects of data warehousing, including approach, architecture, data modeling, ETL, data quality, and OLAP.

I also describe some practical issues that I have encountered in my experience—issues that you’ll also likely encounter in your first data warehousing project— along with the solutions. It is not possible to show examples, code, and illustrations for all the different database platforms, so I had to choose a specific platform.

Nội dung được bảo vệ bản quyền — Tải xuống đầy đủ

Tài liệu Xây Dựng Kho Dữ Liệu Với Ví Dụ Trong SQL Server cung cấp cái nhìn tổng quan về quy trình xây dựng kho dữ liệu, đặc biệt là trong môi trường SQL Server. Nó hướng dẫn người đọc qua các bước thiết kế, triển khai và tối ưu hóa kho dữ liệu, giúp họ hiểu rõ hơn về cách thức tổ chức và quản lý dữ liệu hiệu quả. Những lợi ích mà tài liệu mang lại bao gồm việc cải thiện khả năng truy xuất dữ liệu, tối ưu hóa hiệu suất hệ thống và hỗ trợ ra quyết định dựa trên dữ liệu.

Để mở rộng kiến thức của bạn về lĩnh vực này, bạn có thể tham khảo tài liệu Luận văn nghiên cứu giải pháp kho dữ liệu trong sql server 2008 và áp dụng trong thương mại, nơi cung cấp các giải pháp cụ thể cho việc triển khai kho dữ liệu trong thương mại. Ngoài ra, tài liệu Giáo trình cơ sở dữ liệu nghề kỹ thuật sửa chữa và lắp ráp máy tính trung cấp cũng sẽ giúp bạn nắm vững các khái niệm cơ bản về cơ sở dữ liệu, từ đó hỗ trợ cho việc xây dựng kho dữ liệu hiệu quả hơn. Những tài liệu này sẽ là cơ hội tuyệt vời để bạn đào sâu hơn vào chủ đề và nâng cao kiến thức của mình.