AdventureWorks

Basic Index   Expanded Index

Table Name:Sales.CurrencyRate
Description:Currency exchange rates.
Primary Keys:CurrencyRateID
FieldTypeDefaultsNulls?Comments
CurrencyRateIDint - IdentityNoneNoPrimary key for CurrencyRate records.
CurrencyRateDatedatetimeNoneNoDate and time the exchange rate was obtained.
FromCurrencyCodenchar (3)NoneNoExchange rate was converted from this currency code.
ToCurrencyCodenchar (3)NoneNoExchange rate was converted to this currency code.
AverageRatemoneyNoneNoAverage exchange rate for the day.
EndOfDayRatemoneyNoneNoFinal exchange rate for the day.
ModifiedDatedatetime(getdate())NoDate and time the record was last updated.

IndexClustered?Unique?Fields
PK_CurrencyRate_CurrencyRateIDYesYesCurrencyRateID
AK_CurrencyRate_CurrencyRateDate_FromCurrencyCode_ToCurrencyCodeNoYesCurrencyRateDate
FromCurrencyCode
ToCurrencyCode

No check constraints
Internal Foreign Key ConstraintAffected FieldSource Table
FK_CurrencyRate_Currency_FromCurrencyCodeFromCurrencyCodeSales.Currency
FK_CurrencyRate_Currency_ToCurrencyCodeToCurrencyCodeSales.Currency

Primary Key as Foreign Key ConstraintAffected TableAffected Field
FK_SalesOrderHeader_CurrencyRate_CurrencyRateIDSales.SalesOrderHeaderCurrencyRateID

No triggers