What sort of Database system should I use?
I'm planning to write an address book that stored contact information.
Each contact could have an unlimited number of fields. Mostly st开发者_高级运维rings and integers. But perhaps references to other Objects.
What are the advantages and disadvantages of using an RDBMS with ORM vs OODBMS vs Document DBMS (like CouchDB).
Thanks.
Most of the problems with relational databases is that if you have vast amounts of tables that have joins to one or many tables, and if you require to pull off data once off, you will have to optimise your SQL query to make joins efficient.
In NoSQL databases, the main objective was to be able to be fast and scale horizontally. Some do avoid data joins so you would have to do this yourself (by pulling data in memory and do match joins). Facebook's own Cassandra (now an Apache Project) is basically a NoSQL database system which guarantees no single point of failure.
Also, RDBMS indexing is relatively faster (but that can be debatable) compared to NoSQL databases when it comes to indexing large documents.
I haven't played with CouchDB or MongoDB so I can't compare them. All I know is some do joins in memory (like Redis) which in effect means, pulling all data from database to memory (RAM) and doing joins.
I don't know if that's what you're looking for.
Consider writing the data to a custom text file.
People's address books rarely get past a few hundred entries, so it's easy enough to scan through the entire list for whatever action you need to do.
精彩评论