About Me
Minneapolis, MN
Pet Mom & Foster Mom
What I am Not!
An expert on every aspect of every NoSQL solution
The best at word choice when I get nervous/excited(please stop me if I don't make sense!)
Agenda
Review of Relational Databases
Gr8Ladies Example Application
NoSQL Definition
Types of NoSQL data stores
Example
Relational Databases
Tabular
Defined Schema
Relationships between data
Terms
Database
Table
Row
Column
Groovy
Dynamic, compiled language for the Java Virtual Machine(JVM).
Interoperable with existing Java libraries
Concise, easy to read code
Used by many major companies including:
Groovy is a dynamic compiled language for the JVM. That mean’s it’s dynamic like languages you may
know like Python and PHP, but compiled for efficiency to run on the Java Virtual Machine aka the JVM.
Many of you may be asking, why learn yet another programming language? And granted, Groovy is not the best
language for every situation.
However, in a setting where productivity is paramount and you are looking for the stability of the known
architecture stack like Java, Groovy is the best choice.
As you’ll see, Groovy’s easy to learn, flexible syntax and interoperability with existing Java libraries, make
it a great language to add to your repertoire.
It's not just a prototyping solution and many companies use Groovy for enterprise solutions including Netflix,
LinkedIn, and Mutual of Omaha.
Grails
Groovy Based
Model View Controller(MVC) Web framework for the JVM
Convention over Configuration
Features including:
Object Relational Mapper(ORM)
Domain-Specific Languages(DSL)
Runtime and compile-time Metaprogramming
Extensive Plugin Support
Open-source community driven Project
New in Grails 3
Based on Spring Boot
Switched to Gradle for build system
Major structural changes
Example Task
Gr8Ladies Products
Catalog Products
Shopping Cart
What is NoSQL?
Not Only SQL
Group of data storage solutions that are not Relational Database Management System(RDBMS)
Schema-less
Non-relational
Originally NoSQL was used to refer to databases that did not use SQL or as 'not sql'. Over time, the phrase
has evolved to mean Not Only SQL. As a broad definition, NoSQL describes a group of storage solutions
that are not tabular like traditional relational databases.
Types of NoSQL solutions
Key-value
Document
Column
Graph
Key-value Stores
Examples
MemCached
DynamoDB
Redis*
Uses
Content Caching
Transient Data
Image Stores
Considerations
Relationships
Transactions
Querying
Column Databases
Examples
Cassandra
HBase
Hypertable
Use Cases
CMS Systems/ Blogging Platforms
Log Aggregators
Incremental Counters
Considerations
Schema Changes
Arbitrary unstructured data
Suggested Reading
Sadalage, Pramod J., and Martin Fowler. NoSQL Distilled: A Brief Guide to the Emerging World of Polyglot Persistence . Addison-Wesley Professional, 2012. Print.
Vardanyan, Mikayel. "Picking the Right NoSQL Database Tool." Monitis Blog . 22 May 2011. Web.
Copeland, Rick. MongoDB Applied Design Patterns . O'Reilly Media, 2013. Print.
Chinnachamy, Arun. Redis Applied Design Patterns . Packt Publishing, 2014. Print.
How do I pick just one?
You don't have to!
NoSQL data stores are meant to enhance existing solutions not be a one size fits all solution. Mix and match for various tasks.
Approach # 1
All In - MongoDB GORM
MongoDB
Terminology
Databases
Collections
Document
MongoDB Continued
Highlights
Created When Needed
Optional Fields
BSON Object Ids over Integers
Approach # 2
Partial - Grails-Redis plugin
Redis
Terminology
Highlights
Organized/Indexed Keys
CRUD operations
Key Expiration
Service Level Injection rather than all of GORM
Conclusion
Picking a NoSQL solution depends on the problem
Not every tool is the right one for the job
NoSQL stores are valid alternatives to relational databases
NoSQL solutions are highly supported in Groovy and Grails