Properties

Owner: Production 
Schema bound:  
Encrypted:  
Creation Date: 04/26/2006 
Modification Date: 04/26/2006 
Description: Product names and descriptions. Product descriptions are provided in multiple languages. 

Columns

Name Data Type Length NULL IsGUID Description
  ProductID  int       
  Name  Name  100       
  ProductModel  Name  100       
  CultureID  nchar       
  Description  nvarchar  400       
Total: 5 column(s)

Indexes

Index Primary Unique Description
  IX_vProductAndDescription      Clustered index on the view vProductAndDescription. 
Total: 1 index(es)

Objects that [Production].[vProductAndDescription] depends on

Object Name Owner Object Type Dep Level
  Flag  dbo  User Defined type 
  Name  dbo  User Defined type 
  Culture  Production  Table 
  ProductCategory  Production  Table 
  ProductDescription  Production  Table 
  ProductModel  Production  Table 
  UnitMeasure  Production  Table 
  ProductModelProductDescriptionCulture  Production  Table 
  ProductSubcategory  Production  Table 
  Product  Production  Table 
Total: 10 objects

SQL


CREATE VIEW [Production].[vProductAndDescription]
WITH SCHEMABINDING
AS
-- View (indexed or standard) to display products and product descriptions by language.
SELECT
    p.[ProductID]
    ,p.[Name]
    ,pm.[Name] AS [ProductModel]
    ,pmx.[CultureID]
    ,pd.[Description]
FROM [Production].[Product] p
    INNER JOIN [Production].[ProductModel] pm
    ON p.[ProductModelID] = pm.[ProductModelID]
    INNER JOIN [Production].[ProductModelProductDescriptionCulture] pmx
    ON pm.[ProductModelID] = pmx.[ProductModelID]
    INNER JOIN [Production].[ProductDescription] pd
    ON pmx.[ProductDescriptionID] = pd.[ProductDescriptionID];

See Also

List of views