开发者

Detailed RoR app ... XML w/ MySQL or just MySQL

The project: Imagine a card collector wants to create a database for all his card collections , they collect every type of trading card available. Each trading card has a different set of information (stats) depending on it's type but there could be an infinite number of categories of trading cards. So my questions is, is it better to create a model (table) for each category of trading card or is it better to create an XML file for each card?

The application needs to accomodate for any number of new categories and we are expecting a very large number of categories with very specific data for each categ开发者_开发技巧ory.


there is no reason to store the data in an xml file, rails provide an xml web service for you if you want to serve the information that way, and xml carries the same overhead in regards to checking for different types of representations in your model as you would with data from a database query. you will probably end up storing many of the unique card attributes in some blob or text format in your data model, unless you want to explore a schema-less database solution like couchDB, Riak, MongoDB, etc. I wouldn't advocate that approach specifically, but I will say that a trading card is a good candidate for the 'real-world document' concept that is promoted by the document-based 'nosql' folks.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜