Empty data problem - data layer or DAL?

Posted by luckyluke on Stack Overflow See other posts from Stack Overflow or by luckyluke
Published on 2010-03-14T13:39:40Z Indexed on 2010/03/14 13:45 UTC
Read the original article Hit count: 403

I designing the new App now and giving the following question a lot of thought. I consume a lot of data from the warehouse, and the entities have a lot of dictionary based values (currency, country, tax-whatever data) - dimensions. I cannot be assured though that there won't be nulls. So I am thinking:

  • create an empty value in each of teh dictionaries with special keyID - ie. -1
  • do the ETL (ssis) do the correct stuff and insert -1 where it needs to
  • let the DAL know that -1 is special (Static const whatever thing)
  • don't care in the code to check for nullness of dictionary entries because THEY will always have a value

But maybe I should be thinking:

  • import data AS IS
  • let the DAL do the thinking using empty record Pattern
  • still don't care in the code because business layer will have what it needs from DAL.

I think is more of a approach thing but maybe i am missing something important here... What do You think? Am i clear? Please don't confuse it with empty record problem. I do use emptyCustomer think all the time and other defaults too.

© Stack Overflow or respective owner

Related posts about software-architecture

Related posts about dal