Reputation: 529
I have an email marketting project, after long time researched, I decided to use cassandra to store my data.
My business is to allow my customers to create campaign, then import users from my users database, then send an email to them. After receive our email, the user maybe do some actions (open, view item, buy, complain, unsubscribe ...), I will log this actions based on its campaign.
My data structure is :
This is my first time with cassandra, I've searched and read many source from google but was still confusing about how my data modeling.
Update: my queries
I need to do the below queries:
Please give me an idea or introduce some articles for me on how to model my data?
Thanks very much.
Upvotes: 0
Views: 133
Reputation: 20245
In Cassandra, you model your tables according to your queries; not to the relation between your entities. This means duplicated data is ok, normal and encouraged. Remember, there are no relations between your tables.
So if your query is about listing all campaigns that belong to a customer, this means that your 'customer' table should contains denormalized data. The same goes to rest of your queries.
Upvotes: 3