Thanks Tim,

On May 18, 9:12 am, Tim Shaffer <t...@tim-shaffer.com> wrote:
> I think I would just stick with putting those columns on each table.
> Is there a specific problem you're trying to solve by abstracting them
> out to a separate table? Unless you're trying to remediate a specific
> issue, this seems like a solution in search of a problem.

I am not trying to solve a problem, I am trying to design a database
that is as flexible as possible. I am trying to abstract 'entities' to
their own models. In this case the name has the same structure in all
cases and I am thinking it should have its own 'domain'. I am doing
the same with addresses, although I understand the problem is
different because a person can have more than one address but not more
than 1 name (except for AKAs) or if the person is Jason Bourne... ;)


> > What would be the best/fastest way to query the database with this design?
>
> The fastest way would be to put the name columns on each table. When
> the names are in a separate table, you have to do a join just to get
> the full record.

I understand that but there are also named scopes, which make your
life much easier than coding manual joins. The question specified
"with this design" hoping somebody would be kind enough to point me
into the right direction if I finally go the route I described.

Thanks a lot.

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to