Description
Customers (resellers) of Adventure Works products.
Table properties
| name | value |
|---|
| name | [Sales].[Store] |
| created | Mar 19 2009 9:09PM |
| modified | Mar 19 2009 9:10PM
|
| ansi nulls | on
|
| quoted identifier | on
|
| row count | 701 |
| Size of data | 808 kb |
| Size of indexes | 80 kb |
| Maximum size of a single row | 2,147,483,878 bytes |
Columns
| column | datatype | length | bytes | default | nulls | PK | FK | UQ | computed | comment |
|---|
| BusinessEntityID | int | 10 | 4 | | no
| yes
| BusinessEntity.BusinessEntityID
|
| no
| Primary key. Foreign key to Customer.BusinessEntityID.
|
| Name | Name | 50 | 200 | | no
|
| |
| no
| Name of the store.
|
| SalesPersonID | int | 10 | 4 | | yes
|
| SalesPerson.BusinessEntityID
|
| no
| ID of the sales person assigned to the customer. Foreign key to SalesPerson.BusinessEntityID.
|
| Demographics | xml | max | 2147483646 | | yes
|
| |
| no
| Demographic informationg about the store such as the number of employees, annual sales and store type.
|
| rowguid | uniqueidentifier | 36 | 16 | (newid()) | no
|
| |
| no
| ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
|
| ModifiedDate | datetime | 23 | 8 | (getdate()) | no
|
| |
| no
| Date and time the record was last updated.
|
Indexes
References
Referenced by
Foreign key graph
Foreign keys
| name | columns | foreign columns | type | comment |
|---|
| FK_Store_BusinessEntity_BusinessEntityID | BusinessEntityID | BusinessEntity.BusinessEntityID |
| Foreign key constraint referencing BusinessEntity.BusinessEntityID
|
| FK_Store_SalesPerson_SalesPersonID | SalesPersonID | SalesPerson.BusinessEntityID |
| Foreign key constraint referencing SalesPerson.SalesPersonID
|
Defaults
Dependency graph
Objects that [Sales].[Store] depends on
| name | object type | database | server | level |
|---|
| Name | type | AdventureWorks2008 | SPRING\KATMAI | 1 |
Objects that depend on [Sales].[Store]
Sample rows
| BusinessEntityID | Name | SalesPersonID | Demographics | rowguid | ModifiedDate |
|---|
| 292
| Next-Door Bike Store
| 279
| <StoreSurvey xmlns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"><Ann...
| a22517e3-848d-4ebe-b9d9-7437f3432304
| 10/13/2004 11:15:07 AM
|
| 294
| Professional Sales and Service
| 276
| <StoreSurvey xmlns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"><Ann...
| b50ca50b-c601-4a13-b07e-2c63862d71b4
| 10/13/2004 11:15:07 AM
|
| 296
| Riders Company
| 277
| <StoreSurvey xmlns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"><Ann...
| 337c3688-1339-4e1a-a08a-b54b23566e49
| 10/13/2004 11:15:07 AM
|
| 298
| The Bike Mechanics
| 275
| <StoreSurvey xmlns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"><Ann...
| 7894f278-f0c8-4d16-bd75-213fdbf13023
| 10/13/2004 11:15:07 AM
|
| 300
| Nationwide Supply
| 286
| <StoreSurvey xmlns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"><Ann...
| c3fc9705-a8c4-4f3a-9550-eb2fa4b7b64d
| 10/13/2004 11:15:07 AM
|
| 302
| Area Bike Accessories
| 281
| <StoreSurvey xmlns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"><Ann...
| 368be6dd-30e5-49bb-9a86-71fd49c58f4e
| 10/13/2004 11:15:07 AM
|
| 304
| Bicycle Accessories and Kits
| 283
| <StoreSurvey xmlns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"><Ann...
| 35f40636-5105-49d5-869e-27e231189150
| 10/13/2004 11:15:07 AM
|
| 306
| Clamps & Brackets Co.
| 275
| <StoreSurvey xmlns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"><Ann...
| 64d06bfc-d060-405c-8c60-c067fe7c67df
| 10/13/2004 11:15:07 AM
|
| 308
| Valley Bicycle Specialists
| 277
| <StoreSurvey xmlns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"><Ann...
| 59386b0c-652e-4668-b44b-4e1711793330
| 10/13/2004 11:15:07 AM
|
| 310
| New Bikes Company
| 279
| <StoreSurvey xmlns="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"><Ann...
| 47e4b6bd-5cd1-45a3-a231-79d930381c56
| 10/13/2004 11:15:07 AM
|
Code
CREATE TABLE [Sales].[Store](
[BusinessEntityID] [int] NOT NULL,
[Name] [dbo].[Name] NOT NULL,
[SalesPersonID] [int] NULL,
[Demographics] [xml](CONTENT [Sales].[StoreSurveySchemaCollection]) NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[BusinessEntityID] [int] NOT NULL,
[Name] [dbo].[Name] NOT NULL,
[SalesPersonID] [int] NULL,
[Demographics] [xml](CONTENT [Sales].[StoreSurveySchemaCollection]) NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Store_BusinessEntityID] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
ALTER TABLE [Sales].[Store] WITH CHECK ADD CONSTRAINT [FK_Store_BusinessEntity_BusinessEntityID] FOREIGN KEY([BusinessEntityID])
REFERENCES [Person].[BusinessEntity] ([BusinessEntityID])
ALTER TABLE [Sales].[Store] CHECK CONSTRAINT [FK_Store_BusinessEntity_BusinessEntityID]
ALTER TABLE [Sales].[Store] WITH CHECK ADD CONSTRAINT [FK_Store_SalesPerson_SalesPersonID] FOREIGN KEY([SalesPersonID])
REFERENCES [Sales].[SalesPerson] ([BusinessEntityID])
ALTER TABLE [Sales].[Store] CHECK CONSTRAINT [FK_Store_SalesPerson_SalesPersonID]
ALTER TABLE [Sales].[Store] ADD CONSTRAINT [DF_Store_rowguid] DEFAULT (newid()) FOR [rowguid]
ALTER TABLE [Sales].[Store] ADD CONSTRAINT [DF_Store_ModifiedDate] DEFAULT (getdate()) FOR [ModifiedDate]