AWS - Databases DynamoDB, RDS
AWS - Databases
There are 3 main database types in software world:
Relational databases (MySql, Postgre, Amazon RDS etc.)
Non-relational databases (Mongo, Amazon DynamoDB etc.)
Graph databases (Amazon Neptune, NebulaGraph etc.)
For your specific use case they have advantages and disadvantages. We will cover relational and non-relational databases in this post.
Relational databases - as name implies stores information based on defined relation. Organized by tables, columns, rows. Supports complex queries and joins.
Relational databases - as name implies stores information based on defined relation. Organized by tables, columns, rows. Supports complex queries and joins.
Non-relational databases - contrary to the relational databases non-relational databases are more flexible. Documents, key/value, columns and graphs are some forms can be used to organize data.
Databases in Amazon
There are few ways to use database in AWS :
- Database on EC2 - We deploy any database software onto our instance and use it like this.
- Amazon RDS - Amazon provided service, under the hood you can use (MySql,Postgre,Maria Amazon Aurora etc.) relational database engine.
- Amazon DynamoDB - Amazon provided service, non-relational database
- Amazon ElastiCache - Amazon provided service, in-memory database, good for speed-critical applications.
- Amazon RedShift - Data warehouse for large number of data. For data analytics purposes.
Amazon RDS
Amazon RDS is managed relational database service. Good for consumer facing applications also referred as Online Transaction Processing applications. You must choose database instance type as well. Under the hood Amazon RDS uses Amazon Elastic Block Storage (EBS) and S3 (for backups). We need to choose database engine as well.
Horizontal scaling - We can choose better database instance for better performance.
Vertical scaling - We can use RDS read replica to scale it vertically enlighten the load of primary database. For example we can program web application so that it will read data from RDS read replica but write into primary database.
Let's create our database instance:
- Type RDS into the searchbar available in the main page.
Amazon DynamoDB
Amazon DynamoDB is fully AWS managed highly available nosql database. It is fully serverless service allows document,key/value pair storing. Easily scalable with just one push of the button.
Let's create nosql table and add some items using cli
- Type DynamoDB and click to the icon like below
- Even though this tutorial showed basic concept of Amazon dynamoDB, you can use aws-cli utility to sort,insert,delete,update and more.
Comments
Post a Comment