DynamoDB and NoSQL databases

DynamoDB, a NoSQL database that is fast, scalable, fully managed, allows serverless functions called ‘lambda’, and flexible. Cherry on top, your data is stored on SSDs and automatically replicated across multiple Availability Zones, which provides high availability and data durability.

Let’s discuss our terms a bit, what is NoSQL? NoSQL is a non-relational database that utilizes many data structures like key-value, document, and many other. Let’s focus on using key-value pairs for retrieving data from the database. For key-value pairs each key can’t be replicated. The key-value method has high performance, high scalability, and high flexibility. Another ‘key’ feature of NoSQL databases, is the loss of the ability to perform joins. However, there is still a way to work around this dilemma. One instance, would be using multiple queries to attain the desired data. Since NoSQL queries are faster than relational queries this is a good method, to a certain degree. Additionally, you don’t need a database schema with NoSQL, in most cases you don’t need to explicitly define your schema up front and you can just create new fields as you need them. Very cool.

Why do people use NoSQL versus a relational database? “Motivations for this approach include: simplicity of design, simpler “horizontal” scaling to clusters of machines (which is a problem for relational databases), and finer control over availability. The data structures used by NoSQL databases (e.g. key-value, wide column, graph, or document) are different from those used by default in relational databases, making some operations faster in NoSQL. The particular suitability of a given NoSQL database depends on the problem it must solve. Sometimes the data structures used by NoSQL databases are also viewed as “more flexible” than relational database tables.”

So it depends, on the ‘problem it must solve’. Here’s an example of what those problems make look like (use cases). Example, wall street has been transformed by algorithmic trading and for the purpose of evaluating lots of conditions quickly, a relational database will not due. The high speeds of NoSQL databases have been a cornerstone in stock trading as of late.

Why I choose DynamoDB to write about. I’m currently studying to get my AWS developer and solutions architect certificate. I have an AWS study group that meets twice a week for four hours to work through a course to obtain the skills needed to deploy web applications in the cloud and get certified. So far I’ve learned enough to realize how much I don’t know. At least when it comes to deploying web applications made in Java, it’s not as simple as throwing your code in S3 (simple storage solution, aka Amazon’s version of dropbox or google drive) then configuring S3 to work as web hosting. With a Java application there is a lot more configuring and knowledge required to launch your code. Which is something I’m actively trying to tackle so I can get my Java code deployed to the cloud.

I’m planning on diving deeper into NoSQL databases, since this is what AWS is built from and realistically the future. Using DynamoDB, Amazon Lambda functions, API gateway, S3, and Route 53 you can create serverless architecture, which are super fast, dirt cheap, and freaking cool.

Sources: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html
http://www.dataversity.net/4-use-cases-for-nosql-databases/
https://en.wikipedia.org/wiki/NoSQL

Author: Znergy

I got to school full time for Computer Science, work part time on the weekends, and spend 40/hr M-F at Epicodus (code school). I'm a growing developer and I'm learning new skills everyday.