Thursday, October 7, 2010

[Rails] Re: Dealing with an EAV database

On Oct 7, 4:19 am, Michael Schuerig <mich...@schuerig.de> wrote:
> On Wednesday 06 October 2010, jrq wrote:
>
>
>
> > On Oct 6, 2:29 pm, Michael Schuerig <mich...@schuerig.de> 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?
>
> I don't know. Give it a try. Define just the views and do some queries.
> You wrote earlier that your DB has < 20,000 rows -- in other words, it
> is almost trivially small and surely fits into memory. That is, unless
> the attribute values are extremely large.
>
> > I don't need to do any inserts, so that should not be an issue.
>
> Does that mean that your app does not change the database or that it
> does not change at all? Either way, I'd try views first and if that's
> not fast enough already, there's the option of materializing them
> yourself simply by copying the views to real tables.

My app will not change the tables involved. However, there are other
apps that do change this data. This is not a high-volume transaction
system, so faking a materialized view may prove to be an option.

>
> Michael
>
> --
> Michael Schuerig
> mailto:mich...@schuerig.dehttp://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 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