Good reasons NOT to use a relational database?

后端 未结 21 1515
粉色の甜心
粉色の甜心 2020-12-22 15:14

Can you please point to alternative data storage tools and give good reasons to use them instead of good-old relational databases? In my opinion, most applications rarely us

相关标签:
21条回答
  • 2020-12-22 15:47

    CAP theorem explains it succinctly. SQL mainly provides "Strong Consistency: all clients see the same view, even in presence of updates".

    0 讨论(0)
  • 2020-12-22 15:49

    Matt Sheppard's answer is great (mod up), but I would take account these factors when thinking about a spindle:

    1. Structure : does it obviously break into pieces, or are you making tradeoffs?
    2. Usage : how will the data be analyzed/retrieved/grokked?
    3. Lifetime : how long is the data useful?
    4. Size : how much data is there?

    One particular advantage of CSV files over RDBMSes is that they can be easy to condense and move around to practically any other machine. We do large data transfers, and everything's simple enough we just use one big CSV file, and easy to script using tools like rsync. To reduce repetition on big CSV files, you could use something like YAML. I'm not sure I'd store anything like JSON or XML, unless you had significant relationship requirements.

    As far as not-mentioned alternatives, don't discount Hadoop, which is an open source implementation of MapReduce. This should work well if you have a TON of loosely structured data that needs to be analyzed, and you want to be in a scenario where you can just add 10 more machines to handle data processing.

    For example, I started trying to analyze performance that was essentially all timing numbers of different functions logged across around 20 machines. After trying to stick everything in a RDBMS, I realized that I really don't need to query the data again once I've aggregated it. And, it's only useful in it's aggregated format to me. So, I keep the log files around, compressed, and then leave the aggregated data in a DB.

    Note I'm more used to thinking with "big" sizes.

    0 讨论(0)
  • 2020-12-22 15:50

    Full-text databases, which can be queried with proximity operators such as "within 10 words of," etc.

    Relational databases are an ideal business tool for many purposes - easy enough to understand and design, fast enough, adequate even when they aren't designed and optimized by a genius who could "use the full power," etc.

    But some business purposes require full-text indexing, which relational engines either don't provide or tack on as an afterthought. In particular, the legal and medical fields have large swaths of unstructured text to store and wade through.

    0 讨论(0)
提交回复
热议问题