On 6 March 2010 09:23, Hubert Chang <hui...@gmail.com> wrote: > Like Category, Taxonomy, or folder/file, there will be multiple level > hierarchical relationship. > How to model it in Cassandra? > Serialize all the parent id and the item id together as the key? > How to model it when one child has many parents? >
If you have parent/child data, there is a good chance that it's not big enough to need to be stored in Cassandra. Do you have > 1 billion items? If not, then put it in a conventional RDBMS. If you have 1 billion items, but most of them are "leaf" nodes, it might be a good idea to put only the "leaf" nodes in Cassandra, and put the parent categories in a conventional database. Cassandra is NOT a good general purpose database, it is for very specific cases of high data volume and high write workload. Mark