课程: Databases for Node.js Developers (2021)

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

When to use relational databases

When to use relational databases

- [Instructor] We covered the pros and cons of document databases versus relational databases already when we talked about document databases before. But let me emphasize that again real quick. You want to use relational databases when there are multiple different entities that are in some way related and when the database needs to stay in a consistent state, and when the database should also enforce this consistency no matter from which application it is accessed. In our example later in this chapter, we will use my sequel to store our orders. For that we will first transition the basket that is currently stored into an order, and we will store all items inside this order in a table order item. Then we will delete the contents of the basket and everything going on here should run in one transection. This means it's either everything or nothing and that's a very nice use case for relational database like my sequel.

内容