I have addressed this issue in, oh, every application I have ever written. I would like a final consensus answer!
Is this the most normalized / efficient / correct way to store contact methods or any other data for this template in the database?
Contact { PK ContactId, ... }
ContactContactMethod {PK FK ContactId, PK FK ContactMethodId, Key, Comments }
AddressContactMethod {PK FK ContactMethodId, Line1, Line2, City, State, Zip }
EmailContactMethod {PK FK ContactMethodId, EmailAddress }
InstantMessengerContactMethod {PK FK ContactMethodId, IMClient, IMAddress }
PhoneContactMethod {PK FK ContactMethodId, ... }
WebsiteContactMethod {PK FK ContactMethodId, ... }
OtherContactMethod {PK FK ContactMethodId, ... }
Should I consider the Xml field for ContactMethodDatain the table ContactContactMethod?
Something is just not good for AddressContactMethod, EmailContactMethod, etc., all use the same primary key uniqueness.
I also thought about a key pair of values for contact data, but it will be even more painful than the request than the Xml field.
( : , , ", , .." , )