AdventureWorks Database > Sales Schema : Sales.CreditCard Table |
Creation Date | 08/01/2010 08:40 |
File Group | PRIMARY |
Text File Group | |
System Object | ![]() |
Published for Replication | ![]() |
Rows | 19118 |
Data Space Used | 1,496.00 KB |
Index Space Used | 776.00 KB |
Column Name | Description | Datatype | Length | Allow Nulls | Default | Formula | |
---|---|---|---|---|---|---|---|
![]() | CreditCardID | Primary key for CreditCard records. | int | 4 | |||
CardType | Credit card name. | nvarchar | 50 | ||||
CardNumber | Credit card number. | nvarchar | 25 | ||||
ExpMonth | Credit card expiration month. | tinyint | 1 | ||||
ExpYear | Credit card expiration year. | smallint | 2 | ||||
ModifiedDate | Date and time the record was last updated. | datetime | 4 | (getdate()) |
Index | Description | Primary | Unique |
---|---|---|---|
AK_CreditCard_CardNumber | Unique nonclustered index. | ![]() | |
PK_CreditCard_CreditCardID | Primary key (clustered) constraint | ![]() | ![]() |
Relationship | Description |
---|---|
FK_ContactCreditCard_CreditCard_CreditCardID | Foreign key constraint referencing CreditCard.CreditCardID. |
FK_SalesOrderHeader_CreditCard_CreditCardID | Foreign key constraint referencing CreditCard.CreditCardID. |
Database Object | Object Type | Description | Dep Level | |
---|---|---|---|---|
![]() | Sales.ContactCreditCard | Table | Cross-reference table mapping customers in the Contact table to their credit card information in the CreditCard table. | 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 |
![]() | Sales.vSalesPersonSalesByFiscalYears | View | Uses PIVOT to return aggregated sales information for each sales representative. | 2 |
|