Derby or MySQL or…?

前端 未结 2 424
南方客
南方客 2021-02-05 10:35

For what type of requirements would you choose Apache Derby (or Java DB) over MySQL (or vice versa)? I looked around and people just compare the two but no one talks about when

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-05 11:00

    The requirements that are going to make the difference are the so-called "nonfunctional" requirements: capacity, reliability, throughput (and response time), availability, and security; this along with the software's own issues, like how easily it's available, how hard it will be to maintain software based on it, and so forth.

    Oracle is very fast, very robust, very well supported, and very expensive.

    MySQL is a good general choice with used widely. It can be configured for high availability and reliability (through mirroring and master-slave), it's well understood by a lot of programmers, and integrates well into a lot of platform software like Grails, Rails, and JBoss.

    Derby is good because it's very platform independent and a lot of people read Java easily.

    SQLite is fast, lightweight, and more or less native on Macs.

    ... and so on.

    First, figure out what nonfunctional requirements are important, then choose a DBMS.

    Update

    Okay, following up your comment.

    With those numbers, let me ask first why a separate RDBMS at all? That's 1000 rows -- consider simply storing them in-memory, say in a collection of Collections that you serialize.

    If you really need a DB, say because you're using Rails, then you're not challenging ANY RDBMS -- it may be hard to choose because you're in a domain where all the choices are perfectly good. If so, then pick the one that's easiest to use and easiest to support, which is probably but not certainly MySQL, just because everyone uses it.

提交回复
热议问题