Sunday, January 2, 2011

[Rails] Database Design

Hello,

I have a user table that stores their username, email address, and
password. (along with salt, etc)

However, now I want to have more complex information associated with
each user (address, etc). I'm no DBA expert, so in terms of
performance, which is better:

- A user table that has all the fields in it (Username, Email,
password, country, state, zipcode, etc)
- A user table that only has username/password/email, that is
connected via a foreign key to another table that stores all the other
fields.

Which is better? And why?

Thank you

-David Zhu

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate