Street address information for customers, employees, and vendors.
Creation Date | 27/10/2017 14:33 |
File Group | PRIMARY |
Text File Group | PRIMARY |
System Object | |
Published for Replication | |
Rows | 19614 |
Data Space Used | 2,784.00 KB |
Index Space Used | 2,624.00 KB |
Column Name | Description | Datatype | Length | Allow Nulls | Default | Formula | |
---|---|---|---|---|---|---|---|
AddressID | Primary key for Address records. | Integer | 4 | ||||
AddressLine1 | First street address line. | VarWChar | 60 | ||||
AddressLine2 | Second street address line. | VarWChar | 60 | ||||
City | Name of the city. | VarWChar | 30 | ||||
StateProvinceID | Unique identification number for the state or province. Foreign key to StateProvince table. | Integer | 4 | ||||
PostalCode | Postal code for the street address. | VarWChar | 15 | ||||
SpatialLocation | Latitude and longitude of this address. | UserDefined | 0 | ||||
rowguid | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. | GUID | 16 | (newid()) | |||
ModifiedDate | Date and time the record was last updated. | DBTimeStamp | 4 | (getdate()) |
Index | Description | Primary | Unique |
---|---|---|---|
AK_Address_rowguid | Unique nonclustered index. Used to support replication samples. | ||
IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode | Nonclustered index. | ||
IX_Address_StateProvinceID | Nonclustered index. | ||
PK_Address_AddressID | Primary key (clustered) constraint |
Relationship | Description |
---|---|
FK_Address_StateProvince_StateProvinceID | Foreign key constraint referencing StateProvince.StateProvinceID. |
FK_BusinessEntityAddress_Address_AddressID | Foreign key constraint referencing Address.AddressID. |
FK_SalesOrderHeader_Address_BillToAddressID | Foreign key constraint referencing Address.AddressID. |
FK_SalesOrderHeader_Address_ShipToAddressID | Foreign key constraint referencing Address.AddressID. |
Database Object | Object Type | Description | Dep Level | |
---|---|---|---|---|
Person.BusinessEntityAddress | Table | Cross-reference table mapping customers, vendors, and employees to their addresses. | 1 | |
iduSalesOrderDetail | Trigger | AFTER INSERT, DELETE, UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in SalesOrderDetail and updates the SalesOrderHeader.SubTotal column. | 3 | |
Sales.SalesOrderDetail | Table | Individual products associated with a specific sales order. See SalesOrderHeader. | 2 | |
Sales.SalesOrderHeader | Table | General sales order information. | 1 | |
Sales.SalesOrderHeaderSalesReason | Table | Cross-reference table mapping sales orders to sales reason codes. | 2 | |
uSalesOrderHeader | Trigger | AFTER UPDATE trigger that updates the RevisionNumber and ModifiedDate columns in the SalesOrderHeader table.Updates the SalesYTD column in the SalesPerson and SalesTerritory tables. | 2 | |
HumanResources.vEmployee | View | Employee names and addresses. | 1 | |
Sales.vIndividualCustomer | View | Individual customers (names and addresses) that purchase Adventure Works Cycles products online. | 1 | |
Sales.vSalesPerson | View | Sales representiatives (names and addresses) and their sales-related information. | 1 | |
Sales.vSalesPersonSalesByFiscalYears | View | Uses PIVOT to return aggregated sales information for each sales representative. | 2 | |
Sales.vStoreWithAddresses | View | Stores (including store addresses) that sell Adventure Works Cycles products to consumers. | 1 | |
Purchasing.vVendorWithAddresses | View | Vendor (company) names and addresses . | 1 |
Database Object | Object Type | Description | Dep Level | |
---|---|---|---|---|
Person.CountryRegion | Table | Lookup table containing the ISO standard codes for countries and regions. | 2 | |
dbo.Flag | User Defined Data Type | 2 | ||
dbo.Name | User Defined Data Type | 2 | ||
Sales.SalesTerritory | Table | Sales territory lookup table. | 2 | |
Person.StateProvince | Table | State and province lookup table. | 1 |
|