On Oct 6, 2:29 pm, Michael Schuerig <[email protected]> wrote:
> On Wednesday 06 October 2010, jrq wrote:
>
> > Yes, I'm currently intending to "munge" the unorganized fields into a
> > string, and deal with the parsing/processing at another stage.  yes,
> > it's inefficient, but it's a relatively small amount of processing,
> > and hopefully it will get me to where I need to be within a short
> > amount of time, which is a factor in this situation.
>
> Have you considered using database views? I have never been in this
> situation, so take my suggestions with a grain of salt. Here's what I'd
> try:

I've been looking at that.  I'm not sure how that gets around the
complex queries, unless MySQL supports Materialized Views, which I
don't think it does (and they're are not a great solution).  Or are
you assuming that the caching will get around this problem, once it's
built the first time?

>
> Use database views to map the EAV (non-)schema to sane relational
> schema.
>
> You didn't say if you need to insert into that database. If you do, see
> if MySQL supports updatable views. If it does, give them a try,
> otherwise handle inserts yourself.

I don't need to do any inserts, so that should not be an issue.

>
> If none of this works, consider not using ActiveRecord at all, but
> rather something like sequel is a better fithttp://sequel.rubyforge.org/
>
> Michael
>
> --
> Michael Schuerig
> mailto:[email protected]://www.schuerig.de/michael/

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

Reply via email to