Successfully reported this slideshow.
Data Modeling for Apache Cassandra
Upcoming SlideShare
Loading in …5
×
- 1. data modeling for apache cassandra with a sprinkle of C* background and some time series fun dani traphagen @dtrapezoid
- 2. quiz time - who is this?
- 3. but how do I even ?
- 4. query driven methodology conceptual data model access patterns mapping rules and patterns logical data model erd queries diagram it
- 5. conceptual data modeling • abstract view of the domain • technology independent • not specific to any database system
- 6. entity relationship diagram • entity types • relationship types • attribute types
- 7. relationship keys
- 8. attribute key participation • relationship attributes can make part of the key
- 9. full conceptual model
- 10. query driven methodology conceptual data model access patterns mapping rules and patterns logical data model erd queries diagram it
- 11. application workflow • each application has a workflow • access patterns help us get how data is accessed • know your queries you will run before you design your model
- 12. application workflow
- 13. query driven methodology conceptual data model access patterns mapping rules and patterns logical data model erd queries diagram it
- 14. mapping rules & patterns • mapping rules ensure that a logical data model is right • each query has a corresponding table • tables are designed to allow queries to execute properly • tables return data in the correct order
- 15. mapping rules 1. entities and relationships 2. equality search attributes 3. inequality search attributes 4. ordering attributes 5. key attributes
- 16. entities and relationships 1. entity and relationship types map to tables 2. entities and relationships map to partitions or rows 3. partition may have data about one or more entities and relationships 4. attributes are represented by columns
- 17. entities and relationships
- 18. Each relationship becomes a row in the table Relationship type attributes are represented by columns Queries and relationship cardinality affects the design of the primary key • each relationship becomes a row in the table • relationship type attributes are represented by columns • queries and relationship cardinality affects the design of the primary key
- 19. equality search attributes • equality search attributes become initial columns of a primary key • querying on: title and type
- 20. inequality search attributes • clustering columns follow partition key columns in a primary key • the column involved in an inequality search must come after columns in the primary key that are used in an equality search
- 21. ordering attributes 1. ordering attributes become clustering columns 2. querying on: user_id = ? and uploaded_timestamp > ? 3. ordering attributes : uploaded_timestamp (DESC)
- 22. key attributes 1. relationship type key attributes are included as primary key columns 2. queries affect primary key design
- 23. query driven methodology conceptual data model access patterns mapping rules and patterns logical data model erd queries diagram it
- 24. logical data model
- 25. this sucks a real world example, w/time series data
- 26. This is using simple strategy, but don’t do that in prod PLEASE!
- 27. time series bucketing
- 28. well dani this is all great and everything…but just how do i get started? hm? i mean i want to learn cassandra and try it and everything but it is just so daunting. i mean you showed me all this stuff and i am overwhelmed and it is sort of making me insecure. what exactly do i do next to learn more? how do i really dig in and learn these concepts? have you thought about that? have you thought about what i NEED? HMMMM DANI, HAVE YOU??!!!!!!!!!!11
- 29. & prepare to be wowed
- 30. cdm https://github.com/riptano/cdm cdm preview
- 31. namaste but what does it all mean? also, we’re hiring
Public clipboards featuring this slide
No public clipboards found for this slide