in reply to Re: Efficiency MySQL question
in thread [untitled node, ID 308077]

I do become more and more interested in why there is as yet no module that allows you to store items with meta data (like armor bonus, attackt bonus...ect, different attribs for each item) in a database.

I do this all the time, using standard database modules.

The two primary tactics I use are:

Both work, with some degree of tradeoffs in terms of performance under different types of query regimens.

Replies are listed 'Best First'.
Re: Re: Re: Efficiency MySQL question
by eric256 (Parson) on Nov 18, 2003 at 21:08 UTC

    I have two particular projects that each use one of those tactics. The problem with the first is speed and query building (not hard just has to be done) and the second hides that data away where it can't be easily queried. It would be awesome to have a module that gave you answers in a hash, let you edit it, and then put it back into its prospective parts of tactict 1 (for lack of better nameing). Of course then you have to deal with more complex data structures than a hash, arg, the whole thing quickly grows out of hand. Any ideas? Should this be a new topic or am i all alone here? :)


    ___________
    Eric Hodges
      The problem with the first is speed and query building ... and the second hides that data away where it can't be easily queried.

      Yup. I'm using metadata tables for cases in which most of the information is stored this way, and packed hashes for cases in which most of the data is in normal columns and only a few extras need to be packed away.

      While I do think this technique is useful, I haven't yet found a way to abstract this into a general-purpose solution.

      Both kinds of implementation are reasonably easy to code as a layer over one of the standard RDBMS-OO mapper frameworks, like Class::DBI or my own DBIx::DBO2.