data modeling a scheduling app (adam hutson, datascale) | cassandra summit 2016
TRANSCRIPT
Data Modeling A Scheduling Application
Adam Hutson Data Architect, DataScale Inc.
© 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
Data Modeling Stages
© 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
© 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
© 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
© DataStax, All Rights Reserved.
Data Modeling Stages
7
© DataStax, All Rights Reserved.
Data Modeling Stages
8
© DataStax, All Rights Reserved.
Data Modeling Stages
9
Scheduling Application
© DataStax, All Rights Reserved.
Scheduling Application DefinitionWhat 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
Conceptual Model
© DataStax, All Rights Reserved.
Conceptual Model
13
Logical Model
© DataStax, All Rights Reserved.
Logical Model
15
Desired Queries
© 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
Physical Model
© DataStax, All Rights Reserved.
Physical Model
19
Add new client information
© DataStax, All Rights Reserved.
Physical Model
20
Add new client information
© DataStax, All Rights Reserved.
Physical Model
21
Get client info by name or phone
© DataStax, All Rights Reserved.
Physical Model
22
Get client info by name or phone
© DataStax, All Rights Reserved.
Physical Model
23
Create appointment for specific date/time, client, service, & service technician
© DataStax, All Rights Reserved.
Physical Model
24
Create appointment for specific date/time, client, service, & service technician
© DataStax, All Rights Reserved.
Physical Model
25
Get all scheduled appointments for specified client name or phone
© DataStax, All Rights Reserved.
Physical Model
26
Get all scheduled appointments for specified client name or phone
© DataStax, All Rights Reserved.
Physical Model
27
Get all available times to schedule appointment for specified service & service technician
© DataStax, All Rights Reserved.
Physical Model
28
Get all available times to schedule appointment for specified service & service technician
© DataStax, All Rights Reserved.
Physical Model
29
Get all scheduled appointments for specified service technician
© DataStax, All Rights Reserved.
Physical Model
30
Get all scheduled appointments for specified service technician
© DataStax, All Rights Reserved.
Physical Model
31
End Product: A complete script to create your entire Data Model in Cassandra
Thank You! Questions?
Adam Hutson @AdamHutson [email protected] @DataScaleInc