Striking up a Relationship with Your Data A

SQL Server 2005 does not have a diagramming tool, but Microsoft Visio 2000 has a technique known as reverse engineering a database to create a diagram of the related groups of tables in a database. This is the technique that I use to create the ER diagram shown in Figure 2-1. It pays to have a closer look at Figure 2-1, so here goes. The most detailed table in the diagram is SalesOrderDetail. A foreign key FK1 in this table relates to the Product table. The Product table, in turn, is related to the product subcategory (ProductSubCategory) and the product category (ProductCategory) tables. The information from these product-related tables can be combined to define a product hierarchy. A hierarchy describes how particular business terms are grouped into categories, which in turn are grouped into higher level categories. For example, the product hierarchy represents how products roll up (indicating the hierarchy of products) to subcategories and then to categories. A territory hierarchy, on the other hand, represents how salespersons roll up to territories. Each grouping within a hierarchy is a level of the hierarchy. The product hierarchy has three levels (products, subgroups, and groups), and the territory hierarchy has two levels (salesperson and sales territory). Figure 2-1: Entityrelationship diagram of the Sales Order model from the Adventure Works database. 32 Part I: Just the Basics

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Clan Web Hosting services

Bookmark the permalink.

Comments are closed.