Would a model like this translate well to a document or graph database?

I’m trying to understand what types of models that I have traditionally persisted relationally would translate well to some kind of NoSQL database. Suppose I have a model with the following relationships:

Product  1-----0..N  Order
Customer 1-----0..N  Order

And suppose I need to frequently query things like All Orders, All Products, All Customers, All Orders for Given Customer, All Orders for Given Product. My feeling is that this kind of model would not denormalize cleanly – If I had Product and Customer documents with embedded Orders, both documents would have duplicate orders.

So I think I’d need separate documents for all three entities. Does a characteristic like this typically indicate that a document database is not well suited for a given model? Generally speaking, would a document database perform as well as a relational database in this kind of situation?

I know very little about graph databases, but I understand that a graph database handles relationships more performantly than a document database – would a graph database be suited for this kind of model?

5

In my opinion a document database would not be right for this. I have limited experience, though.

My experience:
15 years of SQL Server, 2 years of Postgres, only 2 projects with MongoDB.

After my years with relational databases I might be biased. But I have really tried to embrace the document concept. It is really great when you have documents, i.e. items that you want to update atomically.

You are describing relations. Relations belong in a relational database. There might be some more evolved document databases which are better for relational data. But they really are built for other uses.

After building some spikes with MongoDB, I built a Node project for relaying data between several external APIs and our own API. The server has been running for a couple of years and handles a couple of hundred thousand imports a year.

MongoDB seemed to be a great fit for this. But as soon as I added user and access control I started to long after a relational db again.

Document databases encourage you to throw everything at it. I challenge I encountered was version handling between different shaped json objects in the same collection (table). I ended up using JSON schema to validate everything going into the collections. This took away some of the freedom I gained by using MongoDB in the first place.

If I’d build that project again I’d do it with Postgres.

Two years ago I started a new project (Node server, React Native app). I started out with MongoDB, but the exact same thing bit me again. As soon as you start to handle users, ACL and critical relations you’ll grow out of MongoDB. I switched to Postgres and the DB now consists of approx 100 normalized tables.

Postgres has a JSON field type which more than well makes up for what I missed from MongoDB.

Summary:
Querying for data in MongoDB is no problem. You’ll find everything you need in a snap. Indexing capabilities are great as well.

Keeping your relational data secure will be a challenge in MongoDB. ACID is the way to go imho.

If I’d grow out of the JSON field type in Postgres I could see myself using MongoDB for some storage, but the main db would definitely be relational.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Would a model like this translate well to a document or graph database?

I’m trying to understand what types of models that I have traditionally persisted relationally would translate well to some kind of NoSQL database. Suppose I have a model with the following relationships:

Product  1-----0..N  Order
Customer 1-----0..N  Order

And suppose I need to frequently query things like All Orders, All Products, All Customers, All Orders for Given Customer, All Orders for Given Product. My feeling is that this kind of model would not denormalize cleanly – If I had Product and Customer documents with embedded Orders, both documents would have duplicate orders.

So I think I’d need separate documents for all three entities. Does a characteristic like this typically indicate that a document database is not well suited for a given model? Generally speaking, would a document database perform as well as a relational database in this kind of situation?

I know very little about graph databases, but I understand that a graph database handles relationships more performantly than a document database – would a graph database be suited for this kind of model?

5

In my opinion a document database would not be right for this. I have limited experience, though.

My experience:
15 years of SQL Server, 2 years of Postgres, only 2 projects with MongoDB.

After my years with relational databases I might be biased. But I have really tried to embrace the document concept. It is really great when you have documents, i.e. items that you want to update atomically.

You are describing relations. Relations belong in a relational database. There might be some more evolved document databases which are better for relational data. But they really are built for other uses.

After building some spikes with MongoDB, I built a Node project for relaying data between several external APIs and our own API. The server has been running for a couple of years and handles a couple of hundred thousand imports a year.

MongoDB seemed to be a great fit for this. But as soon as I added user and access control I started to long after a relational db again.

Document databases encourage you to throw everything at it. I challenge I encountered was version handling between different shaped json objects in the same collection (table). I ended up using JSON schema to validate everything going into the collections. This took away some of the freedom I gained by using MongoDB in the first place.

If I’d build that project again I’d do it with Postgres.

Two years ago I started a new project (Node server, React Native app). I started out with MongoDB, but the exact same thing bit me again. As soon as you start to handle users, ACL and critical relations you’ll grow out of MongoDB. I switched to Postgres and the DB now consists of approx 100 normalized tables.

Postgres has a JSON field type which more than well makes up for what I missed from MongoDB.

Summary:
Querying for data in MongoDB is no problem. You’ll find everything you need in a snap. Indexing capabilities are great as well.

Keeping your relational data secure will be a challenge in MongoDB. ACID is the way to go imho.

If I’d grow out of the JSON field type in Postgres I could see myself using MongoDB for some storage, but the main db would definitely be relational.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Would a model like this translate well to a document or graph database?

I’m trying to understand what types of models that I have traditionally persisted relationally would translate well to some kind of NoSQL database. Suppose I have a model with the following relationships:

Product  1-----0..N  Order
Customer 1-----0..N  Order

And suppose I need to frequently query things like All Orders, All Products, All Customers, All Orders for Given Customer, All Orders for Given Product. My feeling is that this kind of model would not denormalize cleanly – If I had Product and Customer documents with embedded Orders, both documents would have duplicate orders.

So I think I’d need separate documents for all three entities. Does a characteristic like this typically indicate that a document database is not well suited for a given model? Generally speaking, would a document database perform as well as a relational database in this kind of situation?

I know very little about graph databases, but I understand that a graph database handles relationships more performantly than a document database – would a graph database be suited for this kind of model?

5

In my opinion a document database would not be right for this. I have limited experience, though.

My experience:
15 years of SQL Server, 2 years of Postgres, only 2 projects with MongoDB.

After my years with relational databases I might be biased. But I have really tried to embrace the document concept. It is really great when you have documents, i.e. items that you want to update atomically.

You are describing relations. Relations belong in a relational database. There might be some more evolved document databases which are better for relational data. But they really are built for other uses.

After building some spikes with MongoDB, I built a Node project for relaying data between several external APIs and our own API. The server has been running for a couple of years and handles a couple of hundred thousand imports a year.

MongoDB seemed to be a great fit for this. But as soon as I added user and access control I started to long after a relational db again.

Document databases encourage you to throw everything at it. I challenge I encountered was version handling between different shaped json objects in the same collection (table). I ended up using JSON schema to validate everything going into the collections. This took away some of the freedom I gained by using MongoDB in the first place.

If I’d build that project again I’d do it with Postgres.

Two years ago I started a new project (Node server, React Native app). I started out with MongoDB, but the exact same thing bit me again. As soon as you start to handle users, ACL and critical relations you’ll grow out of MongoDB. I switched to Postgres and the DB now consists of approx 100 normalized tables.

Postgres has a JSON field type which more than well makes up for what I missed from MongoDB.

Summary:
Querying for data in MongoDB is no problem. You’ll find everything you need in a snap. Indexing capabilities are great as well.

Keeping your relational data secure will be a challenge in MongoDB. ACID is the way to go imho.

If I’d grow out of the JSON field type in Postgres I could see myself using MongoDB for some storage, but the main db would definitely be relational.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật