| 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. |
| Name | Data Type | Length | NULL | IsGUID | Description | |
| ProductID | int | 4 | ||||
| Name | Name | 100 | ||||
| ProductModel | Name | 100 | ||||
| CultureID | nchar | 6 | ||||
| Description | nvarchar | 400 |
| Index | Primary | Unique | Description | |
| IX_vProductAndDescription | Clustered index on the view vProductAndDescription. |
Objects that [Production].[vProductAndDescription] depends on
| Object Name | Owner | Object Type | Dep Level | |
| Flag | dbo | User Defined type | 1 | |
| Name | dbo | User Defined type | 1 | |
| Culture | Production | Table | 2 | |
| ProductCategory | Production | Table | 2 | |
| ProductDescription | Production | Table | 2 | |
| ProductModel | Production | Table | 2 | |
| UnitMeasure | Production | Table | 2 | |
| ProductModelProductDescriptionCulture | Production | Table | 3 | |
| ProductSubcategory | Production | Table | 3 | |
| Product | Production | Table | 4 |
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