H2ãDerbyãSQLiteã®ä»æ§ã®èª¿æ»ã¡ã¢ï¼ããã¯å¨ãï¼
ã¯ããã«
ã軽éDBã®ããã¯å¨ãã話é¡ã«ãã人ã¯ãã¾ããã¾ããã
ã並å度ãé«ãç¶æ
ã§ä½¿ããã¨ã¯ç¨ã§ãããããã¯å¨ãã¯ããã¨ã©ãã§ãè¯ããã¨ã ã¨ç§ãæãã¾ããã§ããæ°ã«ãªã£ã¦æ°ã«ãªã£ã¦ä»æ¹ãªãã®ã§è»½ã調æ»ãã¾ããã
調æ»å¯¾è±¡
ãç§ããã¾ãã¾ååãç¥ã£ã¦ãããã®ã調æ»ãããã¨ã«æ±ºãã¾ããã
ããã¯ã®ç²åº¦
ãçã£ãããã§ã¯ãªãã®ã§ãããè¦äºã«ã°ãã°ãã
H2
ãããã©ã«ãã¯ãã¼ãã«å
¨ä½ã§ããè¡ã¬ãã«ããã¯ã¯æªãµãã¼ãããã¼ã¿çãªãã°ãè¡ã¬ãã«ããã¯ããµãã¼ããã¦ã模æ§ã
ã(Features -> Comparison to Other Database Enginesãã)
Derby
ãããã©ã«ãã¯è¡ããã¯ã§ãããã ããç¹å®ã®ãã©ã³ã¶ã¯ã·ã§ã³ã«ã¤ãã¦ã¯ãDerbyãããã©ã¼ãã³ã¹ã®ä¸ã®çç±ã§ããã¯ç²åº¦ãè¤æ°è¡ããã¯ããã¼ãã«ããã¯ã«æ¡å¤§ããããããã¾ãããï¼ããããããã¯ã¨ã¹ã«ã¬ã¼ã·ã§ã³ï¼
ãè¡ããã¯ã使ç¨ããªãè¨å®ãå¯è½ã§ããï¼å¸¸ã«ãã¼ãã«ããã¯ã使ç¨ããã¨ãããã¨ï¼
ã(Derby Developer's Guide -> Controlling Derby application behavior -> Locking, concurrency, and isolation -> Lock granularity ãã)
ããã¯ç¨®å¥
ãå ±æããã¯ã¨æä»ããã¯ãå¥ç©ã¨ãã¦åå¨ãã¦ãã¾ãã®ã§ãã©ã®DBãããã¯ã®ç¨®å¥ã«ã¤ãã¦ãä¼¼ã¦ããã¨è¨ãã°ä¼¼ã¦ã¾ãã
H2
æä»ãã㯠| ãã¼ã¿å¤æ´ä¸ã«ç²å¾ãããããã¯ã§ããä»ã®ãã©ã³ã¶ã¯ã·ã§ã³ã«ããããã¯ã®ç²å¾ã¯å¾ ã¡ç¶æ ã«ãªãã¾ãã |
---|---|
å ±æãã㯠| å¤æ´ãä¼´ããªããã¼ã¿èªã¿è¾¼ã¿æã«ç²å¾ãããããã¯ã§ããä»ã®ãã©ã³ã¶ã¯ã·ã§ã³ã«ããå
±æããã¯ã¯ãæä»ããã¯ç²å¾å¾
ã¡ãã©ã³ã¶ã¯ã·ã§ã³ãå±
ãªãå ´åã«ç²å¾ã§ãã¾ãã ä»ã®ãã©ã³ã¶ã¯ã·ã§ã³ããæä»ããã¯ç²å¾è¦æ±ãä¼ã£ãå ´åãå ±æããã¯ãå ¨ã¦è§£é¤ãããã¾ã§ãè¦æ±ããããã©ã³ã¶ã¯ã·ã§ã³ã¯å¾ ã¡ç¶æ ã«ãªãã¾ãã |
ã(Multiple Connections ->Locking, Lock-Timeout, Deadlocksãã)
ãæä»ããã¯ç²å¾å¾
ã¡ã®ç¶æ
ããããã¯ã®ä¸ç¨®æ±ãããªãã®ã§ããã
Derby
æä»ãã㯠| ãã¼ã¿å¤æ´ä¸ã«ç²å¾ãããããã¯ã§ããä»ã®ãã©ã³ã¶ã¯ã·ã§ã³ã«ããããã¯ã®ç²å¾ã¯è¨±ããã¾ããã |
---|---|
å ±æãã㯠| å¤æ´ãä¼´ããªããã¼ã¿èªã¿è¾¼ã¿æã«ç²å¾ãããããã¯ã§ããä»ã®ãã©ã³ã¶ã¯ã·ã§ã³ã®å ±æããã¯ãæ´æ°ããã¯ã¯è¨±å¯ãã¾ããæä»ããã¯ã¯è¨±å¯ãã¾ããã |
æ´æ°ãã㯠| æ´æ°å¯è½ã«ã¼ã½ã«ä½¿ç¨æã«ç²å¾ãããããã¯ã§ããå®éã«ãã¼ã¿æ´æ°ãè¡ãéã«ã¯æä»ããã¯ã®ç²å¾ã試ã¿ã¾ããä»ã®ãã©ã³ã¶ã¯ã·ã§ã³ã®å ±æããã¯ã¯è¨±å¯ãã¾ããæä»ããã¯ãæ´æ°ããã¯ã¯è¨±å¯ãã¾ããã |
ã(Derby Developer's Guide -> Controlling Derby application behavior -> Locking, concurrency, and isolation -> Types and scope of locks in Derby systems ãã)
ãæ´æ°ããã¯ã®ä»æ§ãå人çã«é©ãã§ãããã£ã¨æ´æ°ã§ããªãå¯è½æ§ãåå¨ãããã§ãããè³æã®è§£éééã£ã¦ããªããä¸å®ã
SQLite
æä»ãã㯠| ãã¼ã¿å¤æ´ä¸ã«ç²å¾ãããããã¯ã§ããä»ã®ãã©ã³ã¶ã¯ã·ã§ã³ã«ããããã¯ã®ç²å¾ã¯è¨±ããã¾ããã |
---|---|
å ±æãã㯠| å¤æ´ãä¼´ããªããã¼ã¿èªã¿è¾¼ã¿æã«ç²å¾ãããããã¯ã§ããä»ã®ãã©ã³ã¶ã¯ã·ã§ã³ã®å ±æããã¯ãPENDINGããã¯ç²å¾ã¯è¨±å¯ãã¾ããæä»ããã¯ã¯è¨±å¯ãã¾ããã |
äºç´ãã㯠| æ¸ãè¾¼ã¿ãè¡ãããããæ¢ã«å
±æããã¯ãç²å¾ããã¦ããå ´åã«ç²å¾ããã¾ãã ä»ã®ãã©ã³ã¶ã¯ã·ã§ã³ã®å ±æããã¯ã¯è¨±å¯ãã¾ããäºç´ããã¯ãPENDINGããã¯ãæä»ããã¯ã¯è¨±å¯ããã¾ããã |
PENDINGãã㯠| æ¸ãè¾¼ã¿ãè¡ãããããæ¢ã«å
±æããã¯ãç²å¾ããã¦ããå ´åã«ç²å¾ããã¾ãã å¯è½ãªéãæ©ãæ¸ãè¾¼ã¿ããå ´åã«ä½¿ç¨ããã¾ããäºç´ããã¯ã¨ã¯ç°ãªããå ±æããã¯ã®ç²å¾ã許å¯ãã¾ããã |
ã(File Locking And Concurrency In SQLite Version 3 -> 3.0 Locking ãã)
ãPENDINGããã¯ã¯æ¥æ¬èªã§ä½ã¨ããã®ã§ããããã
åé¢ã¬ãã«
ããµãã¼ããã¦ããåé¢ã¬ãã«ã§ããDerbyã ãã¡ãã£ã¨æ¬æ°åºãã¦ç¨®å¥ãç¨æãã¦ã¾ãã
H2
åé¢ã¬ãã« | ããã©ã«ã | |
---|---|---|
TRANSACTION_READ_UNCOMMITT | ||
TRANSACTION_READ_COMMITTED | ||
TRANSACTION_SERIALIZABLE |
ã(Advanced Topics -> Transaction Isolationãã)
Derby
åé¢ã¬ãã« | ããã©ã«ã | |
---|---|---|
TRANSACTION_READ_UNCOMMITT | ||
TRANSACTION_READ_COMMITTED | ||
TRANSACTION_REPEATABLE_READ | ||
TRANSACTION_SERIALIZABLE |
ã(Controlling Derby application behavior -> Locking, concurrency, and isolation -> Isolation levels and concurrencyãã)
SQLite
ãSQLiteã®ãã¼ã¸ã«ã¯ãä¸è¬çãªåé¢ã¬ãã«ã§ã®è¡¨è¨ãããã¾ããã
ããã©ã³ã¶ã¯ã·ã§ã³éå§ç´å¾ã«ããã¯ãã©ã®ããã«ç²å¾ããããã¨ãã表ç¾ã§è¨è¿°ããã¦ãã¾ãã
ããJDBCã®åé¢ã¬ãã«ã§è¡¨ç¾ããã¨ãããããã¨ï¼ãã¨ããã®ãã¡ã¢ã¨ãã¦ä½µè¨ãã¦ããã¾ãã
åé¢ã¬ãã« | ããã©ã«ã | 説æ | JDBCã§è¨ãã¨ï¼ |
---|---|---|---|
DEFERRED | ãã©ã³ã¶ã¯ã·ã§ã³éå§ç´å¾ã«ã¯ããã¯ãç²å¾ãã¾ããã | TRANSACTION_READ_COMMITTED | |
IMMEDIATE | ãã©ã³ã¶ã¯ã·ã§ã³éå§ç´å¾ã«ãäºç´ããã¯ãç²å¾ãã¾ãã | TRANSACTION_REPEATABLE_READ | |
EXCLUSIVE | ãã©ã³ã¶ã¯ã·ã§ã³éå§ç´å¾ã«ãæä»ããã¯ãç²å¾ãã¾ãã | TRANSACTION_SERIALIZABLE |
ã(SQL Syntax -> BEGIN TRANSACTIONãã)
(ãã¾ã)ã©ã¤ã»ã³ã¹
ããã¾ãã§ã©ã¤ã»ã³ã¹ã§ããç§ã«ã¯ãããããã¾ãããã©ãã¡ã¢ã
H2
MPL 1.1 or EPL 1.0
(license.html ãã)
æå¾ã«
ããã¾ãä¸æãã¾ã¨ã¾ããªãã§ãããããã¦ã¾ã¨ããã¨ä¸è¨ã®ããã«ãªãã¾ãã
- ããã©ã«ãã¯ã©ããTRANSACTION_READ_COMMITTED
- ããã¯ã®ç²åº¦ã¯ã°ãã°ã
- Oracleã¿ããã«SELECTæã«UNDOé åããèªãã¿ã¤ãã¯ç¡ã