简体   繁体   中英

Join SQL with NoSQL databases

我只是想知道将sql数据库与nosql数据库连接起来是否有意义?

Yes it makes sense, one of the big advantage of NoSQL data storage is that data is not tight to specific schema.

One fundamental difference between SQL and NOSQL dB's is support for transactions.

Imagine you were writing a banking app that keeps account balances. You will not be able to achieve accurate balance values unless you use transactions. This is common in all SQL dbs that support ACID semantics.

However support for transactions is not available in NOSql. Therefore NOSql is not suited for any project that needs transactions.

That said, if the same banking app needs tremendous scale, it can be built such that all non transactional data or data that can tolerate "eventual consistency" can use NOSql and data that needs transaction support can be stored in an SQL db.

The advantage of this design would be the benefit of automatic sharding or splitting of data that NOSql DBs provide that allows them to scale easily. In effect, maintenance needs of the DB can be significantly reduced by choosing for a hybrid model such as this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM