21 Mar 2021
Interview - NoSql
- NoSql is a concept when the data is models not using tabular relations used in relational database. NoSql provides simplicitiy of design, simpler horizontabl scaling, but lost the ability to perform some operations fast (like joining, or constraint)
- NoSql should be used,
- when storage is prefered over functionality.
- when the relationship between the data is not important
- the data is growing continuously
- support of join and constriants are not required at the database level
- Architecture Patterns of NoSql:
- Key-Value Store: data stored in form of key-value pairs, typically in a Hash Table; DynamoDb
- Handle large amounts of data and heavy load
- Eay retieval
- Many-to-many relationship may collide
- Multiple kv pair may delay performance
- Columnar: data are stored in columns instead of rows (each column, instead rows, are stored in one or more contiguous blocks); BigQuery, Cassnadra, Redshift, Snowflake
- Fits OLAP, that is not focusing on one specific record, but the property of all the records as a whole
- Doesn’t fit Transaction
- Document Database: like key-value pair, each row is a document, collection of a document can be considered as a table; MongoDb
- Graph Database: map row to nodes, relationship managed by Edge;