扫码阅读
手机扫码阅读

数据仓库模型命名规范

284 2024-06-28

我们非常重视原创文章,为尊重知识产权并避免潜在的版权问题,我们在此提供文章的摘要供您初步了解。如果您想要查阅更为详尽的内容,访问作者的公众号页面获取完整文章。

查看原文:数据仓库模型命名规范
文章来源:
数据干饭人
扫码关注公众号
Article Summary

Summary of Data Model Naming Standards in Data Governance

In the field of data governance and data asset management, having a standardized naming convention for data models is crucial. Such standardization helps maintain an orderly structure within data repositories and enhances the understandability of model names, thereby reducing communication costs and increasing the reusability of models. This approach is akin to organizing library books by index numbers for easy lending.

Basic Naming Principles

  • Readability: Names should be concise and clearly reflect their meaning and purpose.
  • Uniqueness: Each data warehouse object must have a unique name to prevent confusion and conflict.
  • Standardization: Adherence to a unified naming convention ensures consistency and maintainability of names.

Naming Standards

  1. Table Name Standards:
    • ODS layer tables begin with 'ods_', followed by source type, business table name, loading strategy, and loading cycle.
    • DWD layer tables start with 'dwd_', followed by primary data domain, secondary data domain (optional), business process (optional), business description, loading strategy, and loading cycle.
    • DW fact tables are prefixed with 'dw_', followed by a shortened theme name and a descriptive function.
    • DWS application layer tables begin with 'app_', followed by a shortened theme name and a descriptive function.
    • Dimension tables start with 'dim_', followed by meaningful words or abbreviations.
    • Metadata tables are prefixed with 'meta_', followed by an abbreviated application name and a descriptive function.
  2. Field Name Standards:
    • Fields should start with letters and use meaningful words or abbreviations.
    • Avoid numbers unless necessary and ensure consistency across the data warehouse.
    • Field names should not exceed 30 characters; use abbreviations if needed.
  3. Prefix Standards: All table and field names should have clear prefixes that distinguish different levels and types, using lowercase letters separated by underscores.
  4. Naming Length: The length of table and field names should be controlled to improve readability and maintainability.
  5. Special Characters: Avoid using special characters other than underscores in table and field names.
  6. Case Standards: Apart from prefixes, the rest of the naming should use lowercase letters.

Other Considerations

  • Avoid using reserved words to prevent potential conflicts and errors.
  • Ensure naming consistency throughout the data warehouse to avoid different styles or abbreviations.
  • Document the naming standards and regularly review and update them to ensure all relevant personnel are informed and comply with these standards.

Following these naming standards ensures clarity, consistency, and maintainability of data warehouse model naming, which in turn enhances the overall quality and efficiency of the data warehouse. In practice, the most cost-effective approach is for the data warehouse team to maintain a set of naming standards. New team members should first learn these standards, and ETL development should follow the corresponding rules. Submissions of table creation tasks that do not meet the requirements should not pass review. With the increasing degree of platform standardization, some data modeling tools embed these rules, and table fields are generated automatically based on selected conditions, such as hierarchy and data domains.

想要了解更多内容?

查看原文:数据仓库模型命名规范
文章来源:
数据干饭人
扫码关注公众号