need some direction re: model setup

I have a similar problem:     I'm creating a site which will have several clients, each of which will have items in our catalog. The app will be customized as far as layout for each client, but the data for the items needs to be in (at least)three different formats as well, one of which is that the data will be in the form of a scanned image.

For the different attributes, I was thinking of making an item_data table like so

id int ... item id int name varchar(45) contents varchar or text

And then building my layout on that i.e.

<% for datum in @data %>     <tr>        <td><%= datum.name %></td>        <td><%= datum.contents %></td>     </tr> <% end %>

I don't know if this will work well, and I'm wondering if there is a better way to solve dynamic attributes for an object.

Jason

Aaron Wieberg wrote:

Whew, you're right, the implementation does look ugly for an EAV model. Thank you for the information, I'm glad I didn't go ahead with developing that model. Using a single table where some or many values may be null in certain cases will certainly be easier, and I hadn't really thought about how much performance would degrade using a "generic" model.

Jason

Aaron Wieberg wrote: