2

I am modelling a bank account.

Should interest rate be in the DimCheckingAccountId (which shows ProductDimensions, or should it be in fact table, or both). Same with another LoanAccount, should interest rate be in dimension or fact?

I know Transaction Amount should be in the fact table.

create table dbo.FactCheckingAccountTransaction
(

    FactCheckingAccountTransactionId int primary key identity(1,1),
    Dim_CheckingAccountId int,
    Dim_CustomerId int,
    Dim_TransactionDate int,
    InterestRate float.
    TransactionAmount numeric(10,2)
)

create table Dim_CheckingAccount
(
    Dim_CheckingAccountId int primary key identity(1,1),
    CheckingAccountNumber int,
    ProductType varchar(255),
    Dateopened datetime,
    BeginDate datetime,
    EndDate datetime
)
1
  • I'd say it's a dimension in its own right, not even part of the account. – mustaccio Dec 15 '18 at 18:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy