Good reasons NOT to use a relational database?

后端 未结 21 1604
粉色の甜心
粉色の甜心 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: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.

提交回复
热议问题