Hi!
I’m designing the data model of an application.
I have a table “people” who have a lot of attributes. Some of them are:
“phone number”, “AOL Nickname”, “Yahoo Nickname”, “MSN Nickname”,
“e-mail 1” and “e-mail 2”
I have to options to model this:
- Creating a table:
contact_informations(aol, yahoo, msn, email2, email2)
and then doing:
Person has_one :contact_information
Or…
- Just putting those attributes in the table “people”?
I will probably want to query the people table to get a list of e-mails
of a given set of people. Will I have a significant loss of performance
if I use the first option?
In other words: anyone knows what’s the compromise in performance when
using has_one instead of just storing the value as an attribute?
Cheers,
Federico F.