how to store data with many categories and many properties efficiently?

Posted by Mickey Shine on Stack Overflow See other posts from Stack Overflow or by Mickey Shine
Published on 2010-03-08T03:58:48Z Indexed on 2010/03/08 4:36 UTC
Read the original article Hit count: 154

We have a large number of data in many categories with many properties, e.g.

category 1: Book

properties: BookID, BookName, BookType, BookAuthor, BookPrice

category 2: Fruit

properties: FruitID, FruitName, FruitShape, FruitColor, FruitPrice

We have many categories like book and fruit. Obviously we can create many tables for them (MySQL e.g.), and each category a table. But this will have to create too many tables and we have to write many "adapters" to unify manipulating data.

The difficulties are:

1) Every category has different properties and this results in a different data structure.

2) The properties of every categoriy may have to be changed at anytime.

3) Hard to manipulate data if each category a table (too many tables)

How do you store such kind of data?

© Stack Overflow or respective owner

Related posts about database

Related posts about mysql