English 中文(简体)
do document-oriented databases have integrity?
原标题:

I m coming from a MySQL background, and I m interested in document-oriented databases, specifically CouchDB. One of the things I m interested in is data integrity. How do document-oriented databases handle this? For instance, in RDBMSes, there are ways to prevent duplication of records, or guaranteeing that if you have one bit of information, you will have another, or else none at all.

I guess more broadly, my question is, what types of problems are RDBMSes cut out for, compared to problems that DODBes are used for? I looked on some of the other stackoverflow questions for an explanation, but didn t find any good ones.

Also, with my databases at work, I do a lot of reporting, with summing and averaging values, and historical trending. Is this something appropriate for document-oriented databases?

最佳回答

Most of the document-databases have only support very limited integrity or no integrity checks. They rely on the application to ensure that the data is correct. I can tell you how it is in CouchDB.

To the second part. I think RDBMS do very well at reporting and analyzing data. The fact that you can run complex queries on the data with joins, aggregations, functions etc make RDBMS a very powerful reporting-tool. Document-databases do really well for storing the live application-data. It very easy to store an retrieve object-graph into document-databases. The schema-free design makes it easy to extends the model for new application features. However this only works if you can split your application-data into nice documents. Otherwise you loose a lot of the elegance.

If you want to do mostly reporting, I would prefer a RDBMS. When to store lots of flat, simple records it very easy to do reporting on it. The tooling etc. is perfect for reporting. However when want to do reporting on complex structured data, you probably still better of with another database desgine than a RDBMS.

However this doesn t mean you need to limit yourself to RDBMS. You could combine the two technologies. Imagine a blog-software. You store the live application data like blog-posts and comments into the documentdatabase. Data for reporting like click- and login-statistics is stored in a RDBMS. See also Rob Conerys post.

问题回答

暂无回答




相关问题
HABTM Relationship and Named Scopes

I ve been working on this for a while now and I cant seem to find where there error. I have a User Model(:name, :password, :email), and Event model(:name, :etc) and Interest model (:name) [>all ...

HABTM Relationships and the Join Table

I m trying to connect the values of two join tables that I have and show the results based on a conditional relationship...and i m having some problems I have a Users Model(:name, :password, :email), ...

do document-oriented databases have integrity?

I m coming from a MySQL background, and I m interested in document-oriented databases, specifically CouchDB. One of the things I m interested in is data integrity. How do document-oriented databases ...

Relational database tables

I m currently working on an ASP.Net MVC project for a software engineering class. My goal is to create a small online game rental system. I currently have a 3 tables, Movies, Games and Registrants; ...

热门标签