首页> 外文期刊>MSDN Magazine >Model Your Data Hierarchies With SQL Server 2008
【24h】

Model Your Data Hierarchies With SQL Server 2008

机译:使用SQL Server 2008为数据层次结构建模

获取原文
获取原文并翻译 | 示例

摘要

The manufacturing System behind automobiles; the organization of a country into states, counties, cities, and postal codes; the description of a home entertainment system-what do these things have in common? The simple answer is that each describes a hierarchy. SQL Server~R 2008 supports a new data type, HierarchyID, that helps solve some of the problems in modeling and querying hierarchical information. I will introduce you to this data type by discussing a pattern commonly used in manufacturing known as bill of materials (BOM), or bills. Starting with a brief discussion of BOMs, I will illustrate how this kind of data can be modeled. I will also present an implementation of this model in SQL Server 2005. Then I will show you how the HierarchylD data type can be used to implement the model in SQL Server 2008. Automobiles are amalgamations of many components, such as engines, drivetrains, electronics, and steering. In the United States, our geographic territories are divided into states and are then subdivided into jurisdictions called counties. Counties are then further subdivided in different ways by different agencies. The United States Census Bureau, for example, composes them from Census Tract Areas. The U.S. Postal Service routes mail delivery by Zone Improvement Plan (ZIP) codes. Geographic information systems (GIS) may aggregate census tracts and ZIP codes together to provide users with a familiar spatial reference for an area. A recent trip to a local electronics store to evaluate a replacement home entertainment system pointed to a similar sort of hierarchical system-all the combinations of possible components and options left my head spinning! I wondered how such systems could be modeled and implemented in a database system.
机译:汽车背后的制造系统;将国家/地区组织为州,县,城市和邮政编码;家庭娱乐系统的描述-这些东西有什么共同点?简单的答案是每个描述一个层次结构。 SQL Server〜R 2008支持一种新的数据类型HierarchyID,它有助于解决建模和查询分层信息中的一些问题。我将通过讨论通常在制造中使用的称为材料明细表(BOM)的模式来介绍这种数据类型。从对BOM的简短讨论开始,我将说明如何对此类数据进行建模。我还将在SQL Server 2005中提供此模型的实现。然后,我将向您展示如何使用HierarchylD数据类型在SQL Server 2008中实现该模型。汽车是许多组件的组合,例如引擎,传动系统,电子设备和转向。在美国,我们的地理区域被划分为州,然后细分为称为县的辖区。然后由不同的机构以不同的方式对县进行进一步细分。例如,美国人口普查局是根据人口普查区域编写的。美国邮政服务按区域改进计划(ZIP)代码路由邮件传递。地理信息系统(GIS)可以将人口普查区和邮政编码合并在一起,为用户提供一个区域的熟悉的空间参考。最近去当地一家电子商店评估替代的家庭娱乐系统的行程指向了类似的分层系统-所有可能的组件和选项的组合都让我大跌眼镜!我想知道如何在数据库系统中建模和实现这样的系统。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号