cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacques-Henri Berthemet <>
Subject RE: Reg:- Data Modelling For Hierarchy Data
Date Fri, 09 Jun 2017 07:59:14 GMT

According to your model a use can only be of one type, so I’d go with a very simple model
with a single table:

string email (PK), string user_type, map<string, string> attributes

user_type can be Buyer, Master_Seller, Slave_Seller and all other columns go into attribute
map as long as all of them don’t exceed 64k, but you could create dedicate columns for all
attributes that you know will always be there.

Jacques-Henri Berthemet

From: @Nandan@ []
Sent: vendredi 9 juin 2017 03:14
Subject: Reg:- Data Modelling For Hierarchy Data


I am working on Music database where we have multiple order of users of our portal. Different
category of users is having some common attributes but some different attributes based on
their registration.
This becomes a hierarchy pattern. I am attaching one sample hierarchy pattern of User Module
which is somehow part of my current data modeling.

There are few conditions:-
1) email id should be unique. i.e If some user registered with one email id then that particular
user can't able to register as another user.
2) Some type of users having 20-30 columns as in their registration. such as company,address,email,first_name,join_date

Query pattern is like:-
1) select user by email

Please suggest me how to do data modeling for these type of hierarchy data.
Should I create a seperate table for the seperate type of users or should I go with single
user table?
As we have unique email id condition, so should I go with email id as a primary key or user_id
UUID will be the best choice.

Best regards,
Nandan Priyadarshi
View raw message