Interview: No Sql or RDMS
SQL databases are not designed for horizontal scaling.
Relational databases typically provide consistency and availability
1. And support ACID guarantees.
2. Many relational database systems support built-in replication features where copies of the primary database can be made to other secondary server instances.
Write operations are made to the primary instance and replicated to each of the secondaries.
Secondaries can also be used to distribute read operations. While writes operations always go against the primary replica, read operations can be routed to any of the secondaries to reduce system load.
Upon a failure, the primary instance can fail over to a secondary to provide high availability.
3. Data can also be horizontally partitioned across multiple nodes, such as with sharding.
It can end up impacting performance, table joins, and referential integrity.
No-SQL databases- typically support high availability and massive scalability
High volume services that require sub second response time favor NoSQL datastores.
- With no SQl you can achieve eventual consistency via pub-sub pattern
Different Model or accessing and managing data/ Characteristics
1. Document Store (Mongo) : Data and metadata are stored in JSON-based documents inside the database.
2. Key Value Store: Data is represented as a collection of key-value pairs.
3. Wide-Column Store: Related data is stored as a set of nested-key/value pairs within a single column.
4. Graph Store: Data is stored in a graph structure as node, edge, and data properties.
Cosmos DB is a fully managed, globally distributed NoSQL database service in the Azure cloud.
NewSQL databases (Cockroach DB)
NewSQL is an emerging database technology that combines the distributed scalability of NoSQL with the ACID guarantees of a relational database.