| Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check |
|---|---|---|---|---|---|---|---|
| CustomerID | int | Not null | Primary key. Foreign key to Customer.CustomerID. | ||||
| Name | Name | nvarchar(50) | Not null | Name of the store. | |||
| SalesPersonID | int | Null | ID of the sales person assigned to the customer. Foreign key to SalesPerson.SalesPersonID. | ||||
| Demographics | xml | Null | Demographic informationg about the store such as the number of employees, annual sales and store type. | ||||
| rowguid | uniqueidentifier | newid() | Not null | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. | |||
| ModifiedDate | datetime | getdate() | Not null | Date and time the record was last updated. |
The object has no extended properties.
| Primary Key Name | Field Name |
|---|---|
| PK_Store_CustomerID | CustomerID |
| Foreign | Primary | Key Name |
|---|---|---|
| Store.CustomerID | Customer.CustomerID | FK_Store_Customer_CustomerID |
| Store.SalesPersonID | SalesPerson.SalesPersonID | FK_Store_SalesPerson_SalesPersonID |
| Index Name | Description | Clustered | Unique | Fields |
|---|---|---|---|---|
| PK_Store_CustomerID | Clustered index created by a primary key constraint. | Yes | Yes | CustomerID |
| AK_Store_rowguid | Unique nonclustered index. Used to support replication samples. | No | Yes | rowguid |
| IX_Store_SalesPersonID | Nonclustered index. | No | No | SalesPersonID |
| Name | Description | Type | Enabled |
|---|---|---|---|
| iStore | AFTER INSERT trigger inserting Store only if the Customer does not exist in the Individual table. | after Insert | Yes |
| uStore | AFTER UPDATE trigger setting the ModifiedDate column in the Store table to the current date. | after Update | Yes |
| Object Name | Type | Field Name |
|---|---|---|
| Sales.iuIndividual | trigger | N/A |
| Sales.uStore | trigger | N/A |
| Sales.vStoreWithDemographics | view | N/A |