Northwind Database (Document! X Sample)
AdventureWorks Database / Production Schema / Production.vProductAndDescription View
In This Topic
    Production.vProductAndDescription View
    In This Topic
    Description
    Product names and descriptions. Product descriptions are provided in multiple languages.
    Properties
    Creation Date27/10/2017 14:33
    Is Schema Bound
    Encrypted
    Ansi Nulls
    Columns
     Column NameDescriptionDatatypeLengthAllow NullsDefaultFormula
      Integer4   
      dbo.Name50   
      dbo.Name50   
      WChar6   
      VarWChar400   
    Objects that Production.vProductAndDescription depends on
     Database ObjectObject TypeDescriptionDep Level
    Production.Culture tableProduction.CultureTableLookup table containing the languages in which some AdventureWorks data is stored.2
    dbo.Flag datatypedbo.FlagUser Defined Data Type 4
    dbo.Name datatypedbo.NameUser Defined Data Type 2
    Production.Product tableProduction.ProductTableProducts sold or used in the manfacturing of sold products.1
    Production.ProductCategory tableProduction.ProductCategoryTableHigh-level product categorization.3
    Production.ProductDescription tableProduction.ProductDescriptionTableProduct descriptions in several languages.1
    Production.ProductModel tableProduction.ProductModelTableProduct model classification.2
    Production.ProductModelProductDescriptionCulture tableProduction.ProductModelProductDescriptionCultureTableCross-reference table mapping product descriptions and the language the description is written in.1
    Production.ProductSubcategory tableProduction.ProductSubcategoryTableProduct subcategories. See ProductCategory table.2
    Production.UnitMeasure tableProduction.UnitMeasureTableUnit of measure lookup table.2
    View Definition
    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