Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

SQL Server 2019 Master Data Service

Microsoft SQL Server provides Master Data Service as Master Data Management system.

SQL Server 2019 Master Data Service

  1. 1. SQL Server 2019 Master Data Service Kenichiro Nakamura
  2. 2. Before starting the session… Big thanks to Peter Myers for great content. Check out his great contents if you are interested in data. https://www.youtube.com/results?search_query= peter+myers+data
  3. 3. Key Takeaways After taking the session, you can - explain what’s Master Data Management - explain what’s Master Data Service of SQL Server 2019 - install, configure and start using MDS for your projects This session doesn’t cover followings - Programming to consume master data - HA/DR/Performance related information - Migration from prior versions - Integration Scenario from other system
  4. 4. Agenda - Overview - MDS Components - MDS Model Development - MDS Management - MDS Integration - MDS Administration
  5. 5. Overview
  6. 6. What’s Master Data Management In business, master data management (MDM) is a method used to define and manage the critical data of an organization to provide, with data integration, a single point of reference. The data that is mastered may include reference data - the set of permissible values, and the analytical data that supports decision making. https://en.wikipedia.org/wiki/Master_data_management
  7. 7. What are the challenges to solve? • Master data in many different systems • Different versions of data co-exists • Duplicate data in one or many system across the organization • Different business rules and validation for same type of data Inaccurate reporting causes bad decision making via BI
  8. 8. SQL Server Services Database Engine - Hosting Database SSAS - Analysis Service SSIS - Extract, Transform and Load SSRS - Reporting Engine ML Services - Machine Learning Services for R and Python DQS - Data Quality Management MDS - Master Data Management https://docs.microsoft.com/en-us/sql/sql-server/sql-server-technical-documentation?view=sql-server-ver15
  9. 9. History • Since SQL Server 2008 R2 • Improve features in SQL 2012 • Not much change in SQL 2014 • What’s new in SQL 2016 • What’s new in SQL 2017 • SQL Server 2019 - No Silverlight 10+ years product
  10. 10. MDS Components
  11. 11. Master Data Manager Excel Add-in MDS Repository MDS Architecture Browser Notification Other system DQS
  12. 12. Master Data Service Repository • SQL Server to host MDS repository • Enterprise Edition/Developer Edition (please check latest info after GA) • Single Database • MDS system objects • User define objects https://docs.microsoft.com/en-us/sql/master-data-services/install- windows/create-a-master-data-services-database?view=sql-server-ver15
  13. 13. Master Data Manager (Web App) • ASP.NET Web Application (no Silverlight since SQL 2019) • IIS required • Explorer • System Administration • Integration Management • Version Management • Excel Add-in • User/Group management https://docs.microsoft.com/en-us/sql/master-data- services/install-windows/create-a-master-data-manager-web- application-master-data-services?view=sql-server-ver15
  14. 14. Master Data Manager Excel Add-in • Master data CRUD operation • Create master list • Apply Business Rules • Batch operation • Offline • Support connecting to multiple MDS • Conflict resolution • Work with DQS https://docs.microsoft.com/en-us/sql/master-data-services/microsoft-excel-add- in/overview-exporting-data-to-excel-mds-add-in-for-excel?view=sql-server-ver15
  15. 15. Database Mail Profile • SQL Server Database Mail Profile • SMTP server required https://docs.microsoft.com/en-us/sql/master-data-services/create-database- mail-profile-and-account-dialog-box?view=sql-server-ver15
  16. 16. Master Data Services Configuration Manage • MDS Repository Configuration • Web Configuration • DQS Integration
  17. 17. MDS Model Development
  18. 18. MDS Development • MDS objects • Models • Entities • Attributes/Attribute Groups • Indexes • Relationship, etc. • Creating Business Rules • Changeset • Manipulate data
  19. 19. Developing Models • A model has entities (tables) • An entity has attributes (fields) • Transaction Log type • Member – Change logs as history • None – No change logging • Compression • Approval • Code and name required attributes • Code : Unique value • Name : Description of the member Model Entities Attributes https://docs.microsoft.com/en-us/sql/master-data- services/models-master-data-services?view=sql-server-ver15 https://docs.microsoft.com/en-us/sql/master-data- services/entities-master-data-services?view=sql-server-ver15
  20. 20. Attribute • Free-form • Text, Numbers, Dates or Links • File • File, document, images • Domain Based Attribute • Specific set of values (Lookup) • Filter for hierarchy https://docs.microsoft.com/en-us/sql/master-data- services/attributes-master-data-services?view=sql-server-ver15
  21. 21. Indexes • Auto index creation for Code attribute • Unique Index • Non-unique indexes • Non-clustered Index at SQL level https://docs.microsoft.com/en-us/sql/master-data- services/custom-index-master-data-services?view=sql-server-ver15
  22. 22. Hierarchy • Explicit Hierarchies (Same Entity) • Mandatory Explicit Hierarchy • Non-Mandatory Explicit Hierarchy • Derived Hierarchies (Different Entity) • 1:N • N:N https://docs.microsoft.com/en-us/sql/master-data- services/hierarchies-master-data-services?view=sql-server-ver15
  23. 23. Creating Business Rules • Enforce business logic to member • Multiple business rules per attribute • Variety of options • Order matters • Notification • Custom Business Rule (extension) • User defined function for condition in usr schema • Stored procedure for action in usr schema https://docs.microsoft.com/en-us/sql/master-data-services/business-rules- master-data-services?view=sql-server-ver15
  24. 24. Custom Business Rules User defined function • Return BIT (1:true 0:false) • Take 1 input - NVarchar, Datetime2, Decimal (38/0-7) Stored procedure • Table input parameter: @MemberIdList • NVarchar input parameters: @ModelName, @VersionName, @EntityName, @BusinessRuleName https://docs.microsoft.com/en-us/sql/master-data-services/business-rules- extension-master-data-services?view=sql-server-ver15
  25. 25. Demo
  26. 26. MDS Management
  27. 27. Explorer • Entities • CRUD member, Filter, Apply rules, Export to excel, history • Entity Dependencies • Hierarchies • Collections • Changesets https://docs.microsoft.com/en-us/sql/master-data-services/explorer- functional-area-master-data-manager?view=sql-server-ver15
  28. 28. Changeset • Approval Required • Entity level settings • Entity Admin can approve/reject • Local user change • Stage for change • Commit to reflect change
  29. 29. Versioning • Open • Anyone can edit • Lock • Only admin can edit • Validate • Run validation • Commit • Cannot change anymore • Copy • Create new version
  30. 30. Entity Sync Synchronize data from source to target in different models • Sync Job as SQL Agent job • One time • On-demand • Schedule • Target limitation • Target model needs to be open status • Target entity will be locked • No business rule • Domain base attribute will be skipped
  31. 31. Excel Add-in • Most features are same as Data Management Web • Query • Merge Conflict • Settings • Combine Data & Data Quality https://docs.microsoft.com/en-us/sql/master-data-services/microsoft-excel-add- in/overview-exporting-data-to-excel-mds-add-in-for-excel?view=sql-server-ver15
  32. 32. Demo
  33. 33. MDS Integration
  34. 34. Create View • Subscription View • mdm schema • Version Option • Data Source • Format • Leaf • History • SCD Type 2 • Vertical and horizontal filters • Use created view to consume data
  35. 35. Staging table • Staging table for each entity • stg schema • Import Type • 1: Create new members 2: Create new members. Replace existing MDS data with staged data. 3: Deactivate the member, based on the Code value. 4: Permanently delete the member, based on the Code value. • Staging Stored Procedure • stg.udp_<name>_Leaf • stg.udp_<name>_Consolidated • stg.udp_<name>_Relationship https://docs.microsoft.com/en-us/sql/master-data-services/staging- stored-procedure-master-data-services?view=sql-server-ver15
  36. 36. Demo
  37. 37. MDS Deployment
  38. 38. Model Deployment • Master Data Manager • Package Model without data • Deploy Model without data • MDSModelDeploy • Package Model with/without data • Deploy Model with/without data • ModelPackageEditor • Edit package
  39. 39. MDS Administration
  40. 40. Configuring MDS • Master Data Configuration Manager • MDS Repositories • MDS Management portal • DQS integration
  41. 41. Securing MDS • AD or local user • AD or local group • Role base security • Permissions • Grant permission • Deny permission • Granular settings • Model level • Entity level • Attribute level • Member level System Admin MDS Admin Model Admin Data Admin Consumer
  42. 42. References
  43. 43. References edX : Creating a Master Data Solution with SQL Server Master Data Services (MDS) * SQL Server 2016 https://courses.edx.org/courses/course-v1:Microsoft+DAT226x+3T2018 Microsoft Ignite New Zealand 2015 End to End SQL Server Master Data Services * SQL Server 2012 https://www.youtube.com/watch?v=ghChzpt_-FY&t=2862s
  44. 44. References Official Document https://docs.microsoft.com/en-us/sql/master-data-services/master-data- services-overview-mds?view=sql-server-ver15
  45. 45. Fin.

×