More Related Content Similar to Cassandra Summit: Data Modeling A Scheduling App (20) Cassandra Summit: Data Modeling A Scheduling App1. Data Modeling A Scheduling Application
Adam Hutson
Data Architect, DataScale Inc.
2. © DataStax, All Rights Reserved.
Who am I & What do we do?
2
Adam Hutson
Data Architect @ DataScale -> www.datascale.io
DataStax MVP for Apache Cassandra
DataScale provides hosted data platforms as a service
Offering Cassandra & Spark, with more to come
Currently hosted in Amazon & Azure
4. © DataStax, All Rights Reserved.
Data Modeling Stages
• Maps concepts, relationships,
& constraints
• Consists of entity classes with
characteristic attributes
• Nothing to do with a database
4
5. © DataStax, All Rights Reserved.
Data Modeling Stages
• Maps concepts, relationships,
& constraints
• Consists of entity classes with
characteristic attributes
• Nothing to do with a database
5
• Entities become tables
• Attributes become columns/
fields
• Relationships become key
• Entity Relationship Diagram
6. © DataStax, All Rights Reserved.
Data Modeling Stages
• Maps concepts, relationships,
& constraints
• Consists of entity classes with
characteristic attributes
• Nothing to do with a database
6
• Entities become tables
• Attributes become columns/
fields
• Relationships become key
• Entity Relationship Diagram
• Applies constraints of chosen
database
• Table structure using syntax
• Data types, keys, relationships
11. © DataStax, All Rights Reserved.
Scheduling Application Definition
What is it?
Application to schedule service appointments.
Who is it for?
Any employee of the service company.
What does it do?
Sets & retrieves appointments for service.
Client/Service detail requests.
Provider/Service detail requests.
Services delivered/scheduled over time.
11
17. © DataStax, All Rights Reserved.
Desired Queries
17
• Add new client information
• Get client info by name or phone
• Create appointment for specific date/time, client, service, & service technician
• Get all scheduled appointments for specified client name or phone
• Get all available times to schedule appointment for specified service & service technician
• Get all scheduled appointments for specified service technician
19. © DataStax, All Rights Reserved.
Physical Model
19
Add new client information
20. © DataStax, All Rights Reserved.
Physical Model
20
Add new client information
21. © DataStax, All Rights Reserved.
Physical Model
21
Get client info by name or phone
22. © DataStax, All Rights Reserved.
Physical Model
22
Get client info by name or phone
23. © DataStax, All Rights Reserved.
Physical Model
23
Create appointment for specific date/time, client, service, & service technician
24. © DataStax, All Rights Reserved.
Physical Model
24
Create appointment for specific date/time, client, service, & service technician
25. © DataStax, All Rights Reserved.
Physical Model
25
Get all scheduled appointments for specified client name or phone
26. © DataStax, All Rights Reserved.
Physical Model
26
Get all scheduled appointments for specified client name or phone
27. © DataStax, All Rights Reserved.
Physical Model
27
Get all available times to schedule appointment for specified service & service technician
28. © DataStax, All Rights Reserved.
Physical Model
28
Get all available times to schedule appointment for specified service & service technician
29. © DataStax, All Rights Reserved.
Physical Model
29
Get all scheduled appointments for specified service technician
30. © DataStax, All Rights Reserved.
Physical Model
30
Get all scheduled appointments for specified service technician
31. © DataStax, All Rights Reserved.
Physical Model
31
End Product: A complete script to create your entire Data Model in Cassandra