官术网_书友最值得收藏!

IMDB versus IMDG

In-memory databases are fully functional good old RDBMS that store data in memory (RAM). When you make a database query to fetch records or you update a row, you access the RAM instead of the filesystem. RDBMS accesses the disk to seek data and that's why IMDBs are faster than the RDBMS. 

Although IMDBs store data in RAM, your data will not be lost when the machine reboots. You can configure an IMDB to recover from machine restarts/crashes. Typically stores data in memory but keeps a transaction log for each operation. The log appends transaction details at the end of the file. When the machine restarts, it reloads data from the transaction log and creates a snapshot, that's it!

So, for each update or insert operation, it writes a transaction log to disk; shouldn't it slow down the performance? Not really. It is like writing logs for your Java application using Log4j; sequential disk operations are not slow as the disk spindle doesn't move randomly.

Then how is an IMDG different than an IMDB? An IMDG also keeps the data in-memory and has capabilities to recover from failures, as it keeps transaction logs. An IMDB is fully ANSI SQL-compliant but IMDG offers limited support for ANSI SQL; rather, IMDG recommends key-value pair or MapReduce access. IMDB lacks parallel processing of distributed SQL joins. IMDB cannot scale like IMDG; if we add more IMDG nodes, then it can scale more and store more data. IMDG offers ACID compliant DB access and many other features.

主站蜘蛛池模板: 石柱| 寿阳县| 绥江县| 周至县| 东源县| 长海县| 牟定县| 呼伦贝尔市| 高唐县| 锡林浩特市| 福泉市| 班玛县| 高要市| 兰溪市| 曲靖市| 安康市| 姜堰市| 钟祥市| 博乐市| 武平县| 伽师县| 枞阳县| 安陆市| 宜宾市| 乐亭县| 沽源县| 瑞安市| 敖汉旗| 庆元县| 黄山市| 翁牛特旗| 游戏| 麟游县| 平乐县| 黄龙县| 屏山县| 平顶山市| 镇沅| 澄江县| 洮南市| 仁寿县|