mate,
I got what you need..
of course you shouldn't leave a property that's going to have 95% NULL.
in my application I have a similar situation...
there are 3 entities
- Blog
- Article
- Poll
each one can be market with a tag. ( tag clouds implementation )..
so there is a entity named "Tag"
as the relationship is many-to-many...it's necessary 3 other tables to stored the data
- BlogVsTag
- ArticleVsTag
- PollVsTag
naturally there is table named "Tag"
I didn't create a three anothers object to implement that.
each Entity (Blog, Article, Poll) has a property that gives a Collection of Tags. Can be found just one record, hundreds or none.
In your case, could be used the same approach, Address table never would be empty...and the another table "CreditCard_BillingAddress" only would have records when necessary.
here the possible implementation.
Code:
CreditCard objCreditCard = new CreditCard();
IList<Address> addressList = objCreditCard.AddressList;
--------------------
CreditCardTable
--------------------
ID | 10
CreditNumber | XYZ
...
...
so on
--------------------
--------------------
AddressTable
--------------------
ID | 20
CreditCardID | 10
...
...
so on
--------------------
or depending of business logic
--------------------
CreditCardTable
--------------------
ID | 10
CreditNumber | XYZ
...
...
so on
--------------------
--------------------
AddressTable
--------------------
ID | 20
...
...
so on
--------------------
( just 2 columns)
--------------------
AddressXCredicard
--------------------
AddressID | 20
CredicardID | 10
--------------------
that would solve the problem to be found null record without need.
I don't know if you will understand my english..I hope you get it.[/code]