ã¹ã¿ã¼ãã¢ããï¼ã¤ã³ã¯ãªã¡ã³ã¿ã«éçº
ãã¿ã¼ã²ããã«ãããEclipse Pluginã¨ãã¦ä½æããã¦ãã ERDãã¼ã«ã§ãã
(ERMaster ããã©ã¼ã¯ãã ERMaster-b ããã©ã¼ã¯)
RDBæèãé«ããæ ¹æ¬ã®ã¢ãã«
ERDã¯ãRDBæèãé«ããã¢ãã«ã ã¨èãã¦ãã¾ãããã¯ããè¦è¦çãªè¨´ããã¨ããã®ã¯ã人ã«ã¨ã£ã¦å¤§ããªã¤ã³ãã¯ãã§ãã
ããã¯jfluteã®å人çãªæè¦å¤ã§ããã"ERDã®ããç¾å ´" 㨠"ãªãç¾å ´" ã§ã¯ãRDBã¸ã®æèã¬ãã«ãéã£ãããã«æãã¾ãã
"ãªãç¾å ´" ã§ã¯ãSQLã«é¢ããè°è«ããã¥ããããDBã¯åãªãå ¥ãç©ã§ãã¾ãã¾æ§é çã«ä¿åããã¦ããã¨ããæè¦ã«ãªã£ã¦ããã ã¼ãããã£ãããã«æãã¾ãã(ãã¡ããå人差ããã¾ãããç¾å ´ã¡ã³ãã¼ã®ã¹ãã«ã¬ãã«ã¯ãã©ãã©ã§ããã)
èªåããã£ããããã¼ã¨ãã¦ä»äºãããã¨ããããã«RDBããããªãã°ãERDã¯è¦ããã§ãã
ERDã®ãã¼ãããããã«ã¯ï¼
ãã ãERDã®ãã¼ãã¯ãªããªãé£ãããã®ãERDã§ã·ã¹ãã ã¯åãã¾ããããERDãæ£ãããªãã¦ãã·ã¹ãã ã¯åãã¾ãããããã æãã ãã§ã¯ãè¦ããã¨æããããªERDã«ãªãã¾ããã9å²åã£ã¦ããã©1å²ééã£ã¦ã(orå¤ã)ERDãè¦ããã¨ã¯æããªããã®ã§ããã¹ã¿ã¼ãã¢ããã®ç¾å ´ã§å³ãã¡ã³ããã³ã¹ãç¶ããã®ã¯ãã»ã¼ä¸å¯è½ãªãã¨ã ã¨è¨ã£ã¦ãéè¨ã§ã¯ããã¾ããã
äºã¤æ¹æ³ãããã¾ãã
ã²ã¨ã¤ãDBãããªãã¼ã¹ããã
ã§ãããã®æè¡ã¯ç¢ºç«ããã¦ãã¾ããã
ãªãã¼ã¹èªä½ã¯ã§ãã¦ãã人ãç®ã§è¦ã¦å¬ããå½¢ã«é
ç½®ãããªãããã§ãã
ãªãã¼ã¹ããããã®ã人ãæã§ç´ãã¦ãåãªãã¼ã¹ããã¨ãã«é
ç½®ãè¨æ¶ãã¦...ã¨ãã£ã¦ã®ãæãã¤ãããã¯ãã¾ãããå®ç¾ã«ã¯éåã¨æéããããã§ãããã
ããã²ã¨ã¤ãERDããDBãä½ããDBFluteã®ReplaceSchemaã®ãããªæ©è½ãããã°ãERDããDDLãåºåããã ãã§OKã§ãããã®æè¡ã¯å¤ãã®ãã¼ã«ã§ç¢ºç«ããã¦ãã¾ãã
ã¨ãããã¨ã§ãå¾è ã®
ERDããªãã³ã¹ã¿ã¤ã«
ã«ããéç¨ãä¸çªç¾å®çã ã¨èãã¦ãã¾ãã
ã¹ã¿ã¼ãã¢ããã§ã®DBå¤æ´
ã¹ã¿ã¼ãã¢ãããªã©ã®ã¤ã³ã¯ãªã¡ã³ã¿ã«éçºã§ã¯ãç¹å¾´çãªDBå¤æ´ãçºçãã¾ãã
A. æåã¯ãã£ããè¨è¨ããã¨ãããã£ãã
B. DBè¨è¨ã®å¾æãªäººã¯ç¾å ´ã«ããªã
C. ã¿ããªã§DBå¤æ´
A. æåã¯ãã£ããè¨è¨ããã¨ãããã£ãã
ããã¯ããã以åã®ããã°ãåèã«ãªã話ã§ãã
// SIã¨ã¹ã¿ã¼ãã¢ããã®éããç¥ãã | jfluteã®æ¥è¨
http://d.hatena.ne.jp/jflute/20151007/sista
ãã§ã«éç¨ä¸ã®ãã¼ãã«ã«å¯¾ãã¦ãDBå¤æ´ãã²ãã±ãã«çºçãã¾ãã
B. DBè¨è¨ã®å¾æãªäººã¯ç¾å ´ã«ããªã
ããæå¤ã«ãã¤ã³ãã§ãã
ã¹ã¿ã¼ãã¢ããã§éã¾ã£ããã£ããããã¼ãã¡ããªããªã "DBè¨è¨å¾æã§ãï¼" ã£ã¦äººãé½åããåå ããããã¾ããã
åµæ¥ããã°ã©ãã¼ã¯å¾æã ã£ãã¨ãã¦ãããã®ãã¨éã¾ã£ãã¡ã³ãã¼ãå¾æã§ãããã¨ã¯å°ãªãã§ãã
åµæ¥ããã°ã©ãã¼ã¯å¥ã®ãä»äºã§ã©ãã©ãå¿ãããªãã¾ãã
DBè¨è¨ãã¾ãå¾æã§ã¯ãªã人ãè¨è¨ããã¨ãããã¨ãåæã«ããªãã¨ãããªãã®ã§ãã
ãã¡ãã "DBè¨è¨ãã¡ããã¨åå¼·ããã" ã¨ã¯è¨ãã¾ãããä»ã«ãåå¼·ããªãã¨ãããªããã¨ãããããããã¾ãã®ã§ããªããªãDBè¨è¨ã ãã«æ³¨åãããã¨ã¯é£ããã§ãããã
ãµã¼ãã¹ãã§ãããªã£ã¦ãDBã«è©³ãã人ãå ¥ã£ã¦ããã¨ãã¦ããè¦æ¨¡çã«ãã®äººããã¹ã¦ãè¨è¨ããã®ã¯é£ãããã¬ãã¥ã¼ã¯ã¼ã®ç«å ´ã¨ãã¦æ³¨åããã®ãç¾å®çãªã©ã¤ã³ã§ãã
ã¤ã¾ããDBè¨è¨ãã¦ãªãªã¼ã¹ãã¦å¾ããã¾ãDBè¨è¨ãç´ãã
DBãªãã¡ã¯ã¿ãªã³ã°ã®ãããªãã¨ãé »ç¹ã«çºçãã¾ãã
C. ã¿ããªã§DBå¤æ´
"縦å²ãã®å¼å®³" ãé¿ããããã«ããã¾ãå°éã«ããå½¹å²åæ
ããã¾ããã
ã¨ãããããããããããã§ããªãããã人ãå°ãªãã
åãã¡ã¤ã³ãæ å½ãã¦ãã人ããèªåã§DBè¨è¨ãã¦èªåã§SQLæ¸ãã¦èªåã§ç»é¢ä½ãã®ãä¸çªä¸è©±ãªããã¹ã¿ã¼ãã¢ããã§ã¯èªç¶ã¨ãããªãã¾ãã
ãã®ã¨ããgit 㧠alter_db ãã©ã³ããªã©ãä½ã£ã¦ãERDã®ä¿®æ£ãã·ãªã¢ã«ã«è¡ãç¾å ´ãå¤ãã§ããããã¯äººéçãªéç¨ã§ã誰ãERDã®ãã¼ã«ãæã£ã¦ããã®ããããããã«ãã¦ãäºæ ãèµ·ããªãããã«ãã¾ããERDã¯å¤§æµãã¼ã¸ã§ããªãã®ã§ãæåããã«è¨è¨ãã¦ãã¾ãã¨ææ»ãã«ãªã£ã¦ãã¾ãããã§ãã
ERMasterã¨ERMaster-bã®å績
ãã¦ããããã®ã¤ã³ã¯ãªã¡ã³ã¿ã«éçºã®ã¸ã¬ã³ãã解決ãã¹ããjflute身ã®åãã§ã¯ãERMaster 㨠ERMaster-b ã使ã£ã¦ããç¾å ´ãå¤ãã§ãã
ã¿ããªã§DBè¨è¨ããããã«ãã©ã¤ã»ã³ã¹ã®ç¸ãã®ãªã身軽ãªãªã¼ãã³ã½ã¼ã¹ãããã§ããªãããã°ã©ãã£ã«ã«ã§é«æ©è½ã
ERMaster-b ã«é¢ãã¦ã¯ãERMaster ã§ç¾æçã«å³ããã¨ãããä¿®æ£ãã¦ã30ãã¼ãã«ãã300ãã¼ãã«ã«çºå±ãã¦ããéç¨ããè¦äºã«ããªããã ãã®æ©è½ãåãã£ã¦ãã¾ãã
ERMasterã¨ERMaster-bã®ã¸ã¬ã³ã
ãã ãä¿åãã¡ã¤ã«ã¯XMLã§ãããä¿åã®ãã³ã«é åºãIDãå¤ãã£ã¦ãã¾ããå®è³ªçã«ãã¼ã¸ã¯ã§ãã¾ããã
ãã¼ã¸ã¯100æ©è²ãã«ãã¦ããå·®åãåããªãã®ã§ "ä½ãç´ããã®ãï¼"ã®ç¢ºèªãåãã¥ããã®ãã¤ããã§ãã
ãã¡ãããDBFlute ã使ã£ã¦ããã°ãHistoryHTML ã§ããã¯ç¢ºèªã§ãã¾ãããDDLãåºåãã¦èªåçæããã¿ã¤ãã³ã°ã«ãªãã®ã§ããã£ã¨æ©ã段éã§ããããããã®ã§ãã
...
ãªã¼ãã³ã½ã¼ã¹ã®è¯ãã¨ããã§ããããã¤ããã¨ããã§ãããã¾ãã
ERMaster ã ERMaster-b ã¯ã³ããããã»ã¨ãã©ããã¾ãããã¾ã ã¾ã æ¹åã®ä½å°ã¯ããã¨èãã¦ãã¾ããããããé£ããã
ãªã¼ãã³ã½ã¼ã¹ãªã®ã§ç´ããã¯ãã§ãããæ©è½ãé常ã«è±å¯ãªåã³ã¼ããç©ã¿ä¸ãã£ã¦ãããããç¾å®çã«ç¾å ´ã§çæéã§ç´ãã¦ããã¨ããã®ãé£ããã
ãã©ã¼ã¯ãã¦ç´ããã¦ããæ¹ã ãããã£ãããã¾ãããæ¬å®¶ã® ERMaster ããããããæåãããã¦ãããããããåå¥åå¥ã«ã¯åé¡ã¯è§£æ±ºãã¦ãã¦ããããã解決ãä¸ã¤ã«ã¾ã¨ã¾ã£ããããã¯ãã¯åå¨ãããç¾å ´ã§ã¯ã¸ã¬ã³ããæ±ãã¦ããã¨è¨ããã§ãããã
ã¾ãããã©ã¼ã¯ãããããã¯ããããªããã«ã¡ã³ããã³ã¹ãããã¨ã¯éããªãã§ãããã"ERMasterã·ãããããµã" ã¨ãã¦ã®ãã©ã¼ã¯ãã»ã¨ãã©ãã¨ã(ãã¡ãããããã¯ã¦ã¼ã¶ã¼æ¬¡ç¬¬ã¨ãè¨ãã¾ãã)
ãããããã©ã¼ã¯ããããã¨èªä½ã¯ã¨ã¦ãè¯ããã¨ã§ãã
ãã ãããã¨ç¾å ´ã®ã¸ã¬ã³ãã¯å¥åé¡ã§ã
ERFluteã®ããã¡
ããããã®ã¸ã¬ã³ããè¦ä»¶ãæºãããã¦ããããã§ã¯ãªãã§ãã...
ã¨ããããã
ermãã¡ã¤ã«ããã¼ã¸ã§ãã
ããã«ãã¾ããã
ãã¼ã¸ãªãã¦ããªããã£ã¦äººã§ããgitã®å·®åã§ä½ãä¿®æ£ããã®ãããããããã®ã¯å¬ããã§ããããã¾ããç´°ãããã®ã§ããã°ãXML ã ãã®ä¿®æ£ã§ERDã®ä¿®æ£ãã§ãã¾ããä½ã "å£ããã¼" ã¨ããã¨ããXMLã®ä¿®æ£ã§ç´ãããããã¾ããERMaster ã ERMaster-b ã§ã¯ãããã»ã¼ä¸å¯è½ã§ããã
ãã㦠ERFlute ã§ã¯ãããããã®ã¸ã¬ã³ããè¸ã¾ããéç¨ããããã¨æã£ã¦ãã¾ãã
ãã°ããERFluteãåããããªãããªã¡ã³ããã³ã¹ã¯ã§ããªãã¨èãã¦ãã¾ãã
(jfluteã¯ãDBFlute, LastaFluteãæã£ã¦ãã¾ããã)
ããã«ãèãé·ãç¶ãã¦ããããã®æ§æã«ãã¦ããå¿ è¦ãããã¨ãå©ç¨é »åº¦ã®ä½ãæ©è½ã¯ãã£ããåãã¾ãããå¿ è¦ã§ããã°ãã¾ããã®ã¨ãã«ãã£ããã¹ãã¼ãã«ä½ãã°ããã¨ã
ãããããã
ã³ã¼ããã§ããã ãã·ã³ãã«ã«ãããã¨
ãæ±ããããããã§ãã
ERFluteã¯ãERDãæããã¨ã«æ³¨åãããã¨èãã¾ãã
ä¾ãã°ãDBFluteã®ãããªå¨è¾ºãã¼ã«ã§ã§ãããã¨ã§ããã°ããã¾ãERFluteã«ã¯è¦ããªãæ¹åã§ãå®éãDBFluteã«æ©è½ãå®è£ ããæ¹ããä»ã®ERDãã¼ã«ã使ããã¦ãæ¹ãæ©æµãåããããã®ã§ãè²»ç¨å¯¾å¹æãé«ãã§ãã
ãã®ä»£ãããERDãæãããã«å¿
è¦ãªç´°ããæ¹åãç©ã¿ä¸ãã¦ããããã¨æãã¾ãã
ä¾ãã°...
o ãã¼ãã«åãã«ã©ã åã®ç©çåãå¿
é (done)
o ãã¼ãã«åãã«ã©ã åã®éè¤ããªãã¼ã·ã§ã³ (done)
o ã·ã§ã¼ãã«ãããã¼ã®è¿½å (not yet)
o ãªã©ãªã©
ã³ã¼ããæ§æãæ´ãã¦æ°è»½ãªä¿®æ£ããã£ã¨ã§ããããã«ãã¦ãERMasterãERMaster-bã§ã¯æ¹åããã¦ããªãã£ãç´°ããã¨ãããç´ãã¦ããããã¨æã£ã¦ãã¾ãã
ERMaster ã ERMaster-b ã®ã³ã¼ããèªãã ãã¨ãã人ã§ããã°ãERFluteã® XML ãèªã¿è¾¼ãã ãæ¸ãè¾¼ãã ãããã¨ããããã®åã®ã³ã¼ããèªãã¨ãã®æå³ããããããã¨æãã¾ãã
ãã«ãªã¯ãåéãã¾ãã
ã³ã¼ãããããããã«ããã¨å¬ããæ¦å¿µå³ãæä¾ãã¾ãã
ãã¨ãåã ã«ãã©ã¼ã¯ããã "ERMaster-ãªãã¨ã" ã§æ¹åãããå 容ãåãè¾¼ãã¨ããå¯è½ãªç¯å²ã§ã§ããã°ã¨ãããã¦ãã©ãããã©ã¼ã¯ãããªã ERMaster ããã§ã¯ãªãã"ERFluteãããã©ã¼ã¯" ã£ã¦ããåå°ã«ãªããã°ãããªãã¨ãã
ã¯ã¦ãã¦ãã©ããªããã¨ãã
åãªããã©ã¼ã¯ã¨ããããERMaster ã ERMaster-b ã¨ããç´ æã使ã£ã¦ãæ°ããªERDãã¼ã«ãä½ã£ãã¨ãã風ã«è¨ããããããã¾ããã
ã¯ã¦ãã¦ããã¾ããããã©ããã¯ãããã¾ãããã3é±éåã¾ã§ã®ã©ãã«ããªããªãã¸ã¬ã³ããæ±ãã¦ããã¨ãã«æ¯ã¹ãã°...(ãã¤ããERMaster ã ERMaster-b ããããªãã¨ããªããã¨ãã ERD æãã®ã諦ããããªãã£ã¦ãããã...ã£ã¦ã)
éåã¨å¸æã«æºã¡ã¦ããæã¯ããã¾ãã(^^ãããããã®ã§ããããããªããã¨å¦æ³ã ããã¦ãããã®ããå½¢ã«ãªã£ãã¨ãã®å¿«æã¯ã¢ããã¼ã·ã§ã³ã®ã²ã¨ã¤ã§ãã
â»è©¦ãã¦ããã人ã¯ããã£ã¼ãããã¯æ°è»½ã«ããã ããã°ã¨ãããã°ã®ã³ã¡ã³ãã§ãããã§ãããTwitterã®ã¡ã³ã·ã§ã³ã§ãããã§ããã