èæ¯
ããŒã¿ããŒã¹ã«ã¯ãããŒã¿ããŒã¹æ§é ã®ç§»è¡ã«é¢ããããŸããŸãªèšäºãå€æ°æ²èŒãããŠããããã®åé¡ã解決ããããã®å€ãã®ãªãã·ã§ã³ãæäŸãããŠããŸãïŒãã®çš®ã®ç§»è¡ã®å¿ èŠæ§èªäœãæ·±å»ãªåé¡ã§ããããšãèæ ®ãã䟡å€ããããŸãïŒã 奜å¥å¿isçã§ããããã®ãããªãœãªã¥ãŒã·ã§ã³ã®å¿ èŠæ§ãæé€ããããã«æäŸãããé »åºŠã¯ã¯ããã«å°ãªããªããŸãã èè ã¯ãè€éãªåé¡ã®è§£æ±ºçãèŠã€ããã®ã§ã¯ãªãããããé²ãããšãè©Šã¿ãããšããå§ãããŸãã ã§ããã ãæ©ããããè¡ãå¿ èŠããããŸãã 以äžã«ãããŒã¿ããŒã¹æ§é ã®ç§»è¡ã®ãã€ãã¹é¢ã瀺ããããžã§ã¯ãã«ã€ããŠã®ã¹ããŒãªãŒããããŸãã
泚ç®ã«å€ããèšäºïŒ
- ããŒã¿ããŒã¹æ§é ã®ããŒãžã§ã³åããã移è¡ïŒçè«ããå®è·µãž
- ããŒã¿ããŒã¹æ§é ã®ããŒãžã§ã³åããã移è¡ïŒäž»èŠãªã¢ãããŒã
èè ãä¿¡é Œã§ããçç±
誰ãä¿¡çšããããšã¯äžå¯èœã§ãããèè ã¯ãåžžèãšè«çã«å°ããç¶ããé©åãªæçå¿ãæã£ãŠåœŒã®èšèã«åå¿ããããšãå¿ããæãã§ããŸãã ãšã¯ãããèè ã¯ããã°ãã°å€§ãããªåé¡ã解決ãã代ããã«ããã£ãšæ¥œãããã®ã«æéãè²»ããããšãã§ããã°ããããã§ãããã ãã®èšäºã§èª¬æããã¢ã€ãã¢ãè©äŸ¡ãåæã¯ãé·å¹Žã«ããããœãããŠã§ã¢éçºçµéšã®çµæã§ãã ãšããããèè ã¯ã5幎以äžã«ããã£ãŠããã€ãã®æ°è£œåã®æ¢åããã³éçºã®ãµããŒããçããŠããŸããããã®ããã説æãããŠããåé¡ã¯é¢é£æ§ããããŸãã æ°å¹ŽåŸãã€ãã«æ å ±ãå ±æããæ©äŒã«ãªããŸããã 以äžã«ãæ·±å»ãªåé¡ã®å®éã®äŸããããã解決ããé²æ¢ããæ¹æ³ãèŠã€ããããšãã§ããŸãã è°è«ããããããžã§ã¯ãã¯ããªãå°ããã§ãããããã«ãããããããéåžžã«ç€ºåçã§ãïŒ

ãŸãšã
以äžã®è°è«ãä¿é²ããããã«ããã¹ãŠã®ã³ã¡ã³ããä»®å®ãçµè«ãèŠçŽããŠã¿ãŸãã
- ææ°ã®éçºããã»ã¹ã¯ãçãå埩ãé »ç¹ãªãã«ããããã³ç¶ç¶çãªçµ±åã«çŠç¹ãåœãŠãŠããŸã
- å¢åããŒã¿ããŒã¹æ§é ã®å€æŽã¯ãDBMSã®æãããªå¶éã®ããã«éåžžã«é«äŸ¡ã§ã
- éçºã®åæ段éã§ã¯ãDBMSã®å¶éã¯å¿ ãããæçœ/èå³æ·±ããšã¯éããŸããïŒä»¥äžãåç §ïŒ
- æåãã補åã¯ã»ãšãã©ã®åé¡ã«çŽé¢ãã倧ããªãµã€ãºã«éããŸããããã¯ãå€ãã®åé¡ãä¿®æ£ããã³ã¹ããè«å€§ãªãšãã§ã
- ããŒã¿ã¹ãã¬ãŒãžãšåŠçã®éžæã«ãããã¢ããªã±ãŒã·ã§ã³ã¢ãŒããã¯ãã£ã決ãŸããŸã
- åŸã®æ®µéã§ã¢ãŒããã¯ãã£ãå€§å¹ ã«å€æŽããããšã¯ãéåžžã«é«äŸ¡ãªåã³ã§ãã
- ããžãã¹ãšåçæ§ã®é¢ã§æãããªå©ç¹ããããããããã»ã¹ã®ã¹ããŒãã¢ãããè©Šã¿ãã®ã¯éçºã®åŸæ段éã§ã
- ããŒã¿ããŒã¹æ§é ã®å€æŽã«ã¯ãå€ãã®å Žåãä¿åãããããŒã¿ã®è¿œå ã®åŠç/å€æãå¿ èŠã§ãã
- åŸã®æ®µéã§ã¯ãDBMSã®å€ãã®å¶éã«ããããŒã¿ããŒã¹æ§é ã®å€æŽã«ã¯åé¡ããããŸãã
- å€ãã®ãããžã§ã¯ãã§ã¯ãåæ段éã§ã®ããŒã¿ããŒã¹æ§é ã®ããŒãžã§ã³åããã移è¡ã¯æãããªè§£æ±ºçã®ããã«èŠãããã®åŸæ·±å»ãªå¶éã«ãªããŸãã å€ããå°ãªããæ®éçãªã¬ã·ã-ããŒã¿ããŒã¹æ§é ã®é »ç¹ãªå€æŽãé¿ããå¿ èŠããããŸãã
å¥ã®äŸ
çŸä»£éçºã®ç¹åŸŽ
éçºã®çŸä»£çãªã¹ã¿ã€ã«ã«ã¯ãèæ ®ãã¹ãå€ãã®å¶éãšèŠä»¶ããããŸãã ããšãã°ã1é±éããæ°æéã®æéã§ããã¹ãçšã®ã¢ã»ã³ããªããã«ãããããã«æ±ããããå ŽåããããŸãã ãã¹ããæ åœããããŒã ãŸãã¯æ©èœãç¬ç«ããŠå®è£ ããå¥ã®éçºããŒã ã«ã¯ã以åã®è£œåãã«ããæ¢ã«ã€ã³ã¹ããŒã«ãããŠããå¯èœæ§ãããããšãç解ããŠããå¿ èŠããããŸãïŒããŒã¿ããŒã¹ã¯æ¢ã«äœæãããŠããã誰ã倱ããããªããã¹ãããŒã¿ãå«ãŸããŠããŸãïŒäººã ã®æéãå°éãããã«ãéã§ééçãªã¢ããã°ã¬ãŒããç¶æããŸãã éäžçãªéçºã§ã¯ãæ°ããã¢ã»ã³ããªããšã«ããŒã¿ããŒã¹æ§é ã®å€æŽãçºçããå¯èœæ§ããããŸãã
æçµãªãªãŒã¹ã«ã¯ãããŒã¿ããŒã¹æ§é ã«å¯Ÿããå€ãã®å€æŽïŒå€ãã®å Žåãçžäºã«æä»çïŒãå«ãŸããå ŽåããããŸããããã«ãããã¯ã©ã€ã¢ã³ãåŽã®ã¢ããã°ã¬ãŒããé©ãã»ã©é ããªããã·ã¹ãã ã®å®éã®ç®çã«é¢ä¿ãªããéèŠãªèŠå ã èšãæãããšãéçºããã»ã¹ã¯çæ³çã§ã¯ãªãå Žåãããã移è¡ã«äŒŽãããŸããŸãªåé¡ã解決ããããã«è¿œå ã®æéãå¿ èŠã«ãªãå ŽåããããŸãããã¯ã©ã€ã¢ã³ãã«ãšã£ãŠã¯ãåé¡ãå€éšããã®å¹²æžãªãã«ãã¹ãŠãã§ããã ãæ©ãå®è¡ããå¿ èŠããããŸãã
ç°¡åã«ïŒ
- éäžçãªéçº-é »ç¹ãªã¢ã»ã³ããªãšããŒã¿ããŒã¹æ§é ã®é »ç¹ãªå€æŽ
- éçºè ã¯åç¬ã§åäœããŸãã-ãã¹ã¿ãŒãšäŸåéçºè ãèŠããŠãããŠãã ãã
- åé¡ã¯ç§»è¡ã®ã©ã®æ®µéã§ãçºçããå¯èœæ§ããããŸã
- å€ãã®å Žåã移è¡ã®åé¡ãããã«ç¹å®ããããšã¯å°é£ã§ã
- ãå£ããåºç€ãã¯åžžã«æéã®ã³ã¹ãã«ã€ãªãããŸã
- ããŒã¿ããŒã¹ããæŽæ°ããåæºãããã«ã¯æã£ãŠããéã«æ°æéåŸ æ©ããã¯ã©ã€ã¢ã³ã
- 顧客ã®å€±æãšã¯ãæ°æ¡ãå€ãã®åé¡ãšãã®è§£æ±ºã«å¿ èŠãªæéãæå³ããŸã
äŸ1ã14幎åã®ã·ã¹ãã
ç°¡åãªèª¬æ
解決ãã¹ãäž»ãªåé¡ã¯ãããã€ãã®ã¿ã€ãã®ãããã¯ãŒã¯ããã€ã¹ã®å¹³åæ°ã管çããããšã§ãã å®éã®ã€ã³ã¹ããŒã«ã®ãµã€ãºã¯ã1ã60å°ã®ããã€ã¹ã§ããã ã·ã¹ãã ãããããã€ã¹ã¯æ§æããã³å¶åŸ¡ã³ãã³ããåä¿¡ããããã«å¿ããŠç¢ºèªãããŸããŸãªçµ±èšãããã³ããã¬ã¡ããªãŒããéä¿¡ããŸãã ãã®ã·ã¹ãã ã¯ãããŸããŸãªããã€ã¹æ§æãç·šéããããã®ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ã€ã¹ãå®è£ ããŠããŸãã èšå®ïŒããã³ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ã€ã¹ïŒã®è€éããå±¥æŽã®ä¿åãèšå€§ãªæ°ã®ãªãã·ã§ã³ã®ãµããŒããç¹å®ã®ãŠãŒã¶ãŒããŒã¿ã¿ã€ããªã©ã«æ³šæãã䟡å€ããããŸãã æ§æã«ã¯ã10ããæ°çŸã®ç°ãªããã©ã¡ãŒã¿ãŒãå«ããããšãã§ããŸãã ãã¹ãŠã®ããŒã¿ãä¿åããããã«ãããŒã¿ããŒã¹ã䜿çšãããŸããïŒäž»ã«MySQLïŒã
ç°¡æã¢ãã«
åºæ¬çã«ãã·ã¹ãã ã®ã¿ã¹ã¯ã¯ãåã¿ã€ãã®ããã€ã¹ã®æ°çŸã®ãã©ã¡ãŒã¿ãŒãä¿åãããŠãŒã¶ãŒã«ããããç·šéããããã®äŸ¿å©ãªã€ã³ã¿ãŒãã§ãŒã¹ãæäŸããããã€ã¹ã«éä¿¡ãããçµæã®æ§æã圢æããããšã§ãã
ã¿ã€ã ã©ã€ã³ïŒå§ãŸã
ä»ã®è£œåã®å Žåãšåæ§ã«ããã®ã·ã¹ãã ã®éçºã¯1ã€ã®ããã€ã¹ãããã€ãã®ãã©ã¡ãŒã¿ãŒãéåžžã«åçŽãªããŒã¿ããŒã¹æ§é ããå§ãŸããŸããã æåã®ã¢ã€ãã¢ã«ãããšãæ§æãä¿åããããŒãã«ã®åãã©ã¡ãŒã¿ãŒã«åå¥ã®åã䜿çšãããŸããã ãã®ãããªãœãªã¥ãŒã·ã§ã³ã¯ãç°¡åã§æé©ãšã¯ã»ã©é ããã®ã§ããããé·ç¶ãããŸããã§ãããã¯ã©ã€ã¢ã³ãããŒã¹ã®æ¡å€§ã«ã¯ãåããã€ã¹ã®ãã©ã¡ãŒã¿ãŒæ°ã®å¢å ãæ°ããã¿ã€ãã®ããã€ã¹ã®è¿œå ã«é¢é£ããŠãããå€ãã®æ©èœãè¿œå ããå¿ èŠããããåã®1ã€ã«ããŒã«ããã¯ã§ããã¹ããŒãªãŒããŒãžã§ã³ãªã©

顧客ããŒã¹ã®æ¡å€§ã«ãããäŒç€Ÿã¯ãŸããŸãã¢ã¯ãã£ããªéçºã¹ã¿ã€ã«ãæã¡ãæ°ãã顧客ã®èŠæ±ãå®è£ ããããå³ãããªãªãŒã¹ã¹ã±ãžã¥ãŒã«ã«ç§»è¡ããå¿ èŠããããŸããã éçºãå éããå¿ èŠããããããããã€ãã®ã»ãŒç¬ç«ããããŒã ãäœæãããŸããã誰ããããã€ã¹ã®éçºã«å°å¿µãã誰ããå¶åŸ¡ã·ã¹ãã ãéçºãç¶ããããã«ããã€ãã®ããŒã ããœãªã¥ãŒã·ã§ã³ã®ãåç©åãå šäœããã¹ããã責任ãè² ããçªç¶å€§ããªå©çãããããå§ããŸããã
ãã®æ®µéã§ã®åé¡
ãŠãŒã¶ãŒã¯å¶åŸ¡ã·ã¹ãã ãä»ããŠããã€ã¹ãšå¯Ÿè©±ãããããåŸè ãéçºããã³æ¹åããã¿ã¹ã¯ã¯éåžžã«éèŠã«ãªããŸããã æ°ããæ©èœã®å®è£ ã¯ãããŒã¿ããŒã¹å ã®1ã€ä»¥äžã®ãã©ã¡ãŒã¿ãŒïŒåïŒã®è¿œå ãåé€ããŸãã¯çœ®ãæãããŠãŒã¶ãŒã€ã³ã¿ãŒãã§ãŒã¹ãšçæãããæ§æã®å¯Ÿå¿ããç·šéã«éå®ãããŸããã ããããåŸã§å€æããããã«ãã»ãšãã©ã®å Žåãéçºè ã¯ããŒã¿ããŒã¹æ§é ã®å€æŽã«é¢é£ããããŸããŸãªåé¡ã®è§£æ±ºã«è²»ãããŸããã 誰ããã¹ãããŒã¿ãææŸããããªãã£ããã次ã®å€æŽåŸã«ã·ã¹ãã ã皌åç¶æ ã«ããããã®è¿œå ã®æé ãå®è¡ããããªãã£ãã
å瀟ã®ã¯ã©ã€ã¢ã³ãã«ãåé¡ã¯ãããŸããã§ãããé·æã«ããã£ãŠããã€ã¹ã管çããèœåã倱ããããšæã£ã人ã¯ã»ãšãã©ããŸããã§ãããæããã«ãå¶åŸ¡ã·ã¹ãã ãªãã§ã¯èª°ãæã¿ãŸããã§ããã ããããããŒã¿ããŒã¹ã®ãµã€ãºã¯æ°åã¡ã¬ãã€ãããã®ã¬ãã€ãã®ç¯å²ã§ãã£ãããã移è¡ãå®äºããã®ãåŸ ã€ããã«æ°æéãè²»ããäžæºã®ã客æ§ïŒå€ãã®å ŽåããªãªãŒã¹ã«ã¯æ°åãŸãã¯æ°çŸã®å€æŽãå«ãŸããŠããŸããïŒããã€ã³ã¹ããŒã«ããã»ã¹äžã«äœããã®ãšã©ãŒãåãåã£ãæªæã®ããã客æ§ã§ãããããŸããã·ã¹ãã ã®æ°ããããŒãžã§ã³ãšãµããŒããµãŒãã¹ããããã«æ³šæãæãã®ãåŸ ã£ãŠããŸãã
æè¡çãªè©³çŽ°
ALTER TABLEã䜿çšããŠæ¢åã®ããŒãã«ãå€æŽããããšã¯ãããããå®äŸ¡ãªæäœã§ã¯ãããŸããã èè ã¯ãããŒãã«ã¡ã¿ããŒã¿ã®å€æŽã«è³ãçæ³çãªãªãã·ã§ã³ãäºåã«çç¥ããååšããå¯èœæ§ã®ããã€ã³ããã¯ã¹ãããŒã¿ãå€æããå¿ èŠæ§ããã£ã¹ã¯äžã®ããŒã¿ã®ç©ççãªé 眮ãçæ³çãªããŒãã«ãã¥ãŒãšããŒã¿ã®å®éã®é 眮ãšå¯Ÿå¿ããããã©ãŒãã³ã¹ã®åé¡ã®éãã«ã€ããŠèããããã«èªè ãä¿ããŠããŸãã
ã¡ãªã¿ã«ãALTER TABLEã䜿çšããªããšããåŒã³åºãã«åºãããããšããããããããã·ãŒãžã£ãããã³ããŒåã®å€æŽãåªå ããŸãïŒäŸïŒ ããŒãã«ãå€æŽããªããã³ããŒããŠååãå€æŽãã ïŒ
ã©ããªå Žåã§ããæãåçŽãªè€éãã§ã¯ãªãããŒã¿ãå€æããã«ã¯ãäœããã®ããã°ã©ãã³ã°èšèªã§å®è£ ãããè¿œå ã®ããžãã¯ã䜿çšããå¿ èŠããããŸãã
解決ç
ãã®æ®µéã§ãäŒç€Ÿã®æããé è³ã¯ãããŒã¿ããŒã¹æ§é ãå€æŽããéåžžã«ãã¡ãã·ã§ããã«ãªïŒäººæ°ãåãå§ããïŒXML圢åŒã§ããã€ã¹æ§æãä¿åããå¿ èŠæ§ãå®å šã«åãé€ãããšã«ããŸããã åæããŸããéåžžã«äŸ¿å©ã§ããXMLããªããžã§ã¯ãããªãŒã«ãã·ãªã¢ã©ã€ãºããããããæäœããŠãããXMLã«ã·ãªã¢ã©ã€ãºããŠããŒã¿ããŒã¹ã«ä¿åããŸãã åœç¶ãããŒã¿ããŒã¹ã«ã¯BLOBã衚瀺ãããŸããããã°ããã®éããã®åé¡ãããŒã¿ããŒã¹ã«ä»»ããããšã«ããŸããã ããŒã¿ãå€æããããã«ãå°ããªç¬ç«ããããã°ã©ã ïŒæåã¯perlã¹ã¯ãªããã次ã«Javaã®ããžãã¯ïŒã䜿çšãããŸãããããã«ãããããŒã¿ããŒã¹ã®ããŒãžã§ã³XããããŒãžã§ã³Yãžã®é 次å€æãä¿èšŒãããŸããã

å¹æ
æ°ããæ©èœïŒæ°ãããªãã·ã§ã³ïŒã®è¿œå ãXMLè¡šçŸã®å€æŽã«æžã£ããããããŒã¿ããŒã¹æ§é ãžã®å€æŽã¯ãŒãã«æžããããã»ã¹ãå€§å¹ ã«ç°¡çŽ åããŸããïŒå°ãªããšãããŒã¿ããŒã¹ã®æäœã®èŠ³ç¹ããïŒã äœãå¿é ããããšãªããããè€éãªããŒã¿æ§é ãæäœã§ããããã«ãªã£ããããéçºããã»ã¹ãå éããŸããã ããã§ãå±¥æŽãä¿åããããšãã§ããŸãïŒããã€ãã®XMLãä¿åããã ãã§ãïŒã
ã¿ã€ã ã©ã€ã³ïŒãªãããš
æ§æä¿ç®¡æ¹æ³ãå€§å¹ ã«åŠçããåŸãã·ã¹ãã ã®éçºãå éããäžèŠãããšããåé¡ã®æ°ãæžå°ããŸããã äŒç€Ÿã¯æ°ããããŒãžã§ã³ããªãªãŒã¹ããŸãããããã¯ã€ã³ã¹ããŒã«äžã«å€ãããŒã¿ããŒã¹ãæ°ãã圢åŒã«å€æããæ確ãªçç±ãªãã«åã³é¡§å®¢ã«æéãè²»ãããŸãããå°æ¥ã®ãã©ãã«ããããããæãããšãçŽæããŸãã 顧客ã¯ä¿¡ããŠèŠããã ã ãã®åŸãã·ã¹ãã ã®æ©èœãæ¡åŒµãã以åã®ããŒãžã§ã³ã®åé¡ã解決ããæ°ããããŒãžã§ã³ãç¶ããŸããã ã·ã¹ãã ã®æ°ããããŒãžã§ã³ãžã®åãæ¿ãã«ã¯15ã30åããããŸãããããã¯éåžžã«æ·±å»ãªææã®ããã«èŠããŸããã ããããããã¯é·ãã¯ãããŸããã§ããã æ©èœã®å¢å ã«ãããä¿åããŒã¿ãççºçã«å¢å ããŸããã ããã«ãããæåŸã®åœ¹å²ããã¯ã»ã©é ãã®ã¯ãæ§æå€æŽã®çžå¯Ÿçãªå®ãã§ãã éçºè ã¯ãå°æ¥ãæ°ã«ããã«å®å šã«å®è£ ããæãç°¡åãªæ¹æ³ãéžæããŸããã
ãã®ã¢ãããŒãã®çµæã倧éã®XMLã³ãŒããšãåŸç¶ã®åããŒãžã§ã³ãžã®ç§»è¡äžã«å¿ èŠãªå€æ°ã®å€æãè¡ãããŸããã ãã®æ®µéã§ãããŒã¿ããŒã¹ãX.1ç¶æ ããX.2ç¶æ ïŒæ°ããæ©èœãè¿œå ãããïŒã«è»¢éããã«ã¯ãXMLããŒã¿ããŒã¹ã«æ ŒçŽãããæ§æè¡šçŸã§1ã€ãŸãã¯è€æ°ã®å€æãå®è¡ããå¿ èŠããããŸããã ãã®ãããªå€æãæ£åžžã«å®è¡ããåŸã«ã®ã¿ãã·ã¹ãã ã¯åäœãéå§ã§ããŸãïŒæŽæ°ãããã³ãŒãã¯ä¿åããããã¥ãŒãéã·ãªã¢ã«åã§ããŸãïŒã
ãã®æ®µéã§ã®åé¡
æ§æå€æã¯ãä¿åãããXMLãã¡ã€ã«ã®äžé£ã®é 次å€æã§ããïŒXMLãã¡ã€ã«ã¯å®éã«ã¯ããŒã¿ããŒã¹ã«ä¿åãããŠããŸãããåæ段éã§ã¯ããã€ã¹ãšå®å šã«äºææ§ããããŸããïŒã ãããã®å€æã®äžéšã§ã¯ãXMLè¡šçŸãæååãšããŠæ±ããéåžžã®çœ®æã䜿çšããŸããã ä»ã®ããã°ã©ããŒã¯ãDOMããªãŒã䜿çšããããSAXããŒãµãŒã䜿çšããŠãæé©åãããããªãã·ã§ã³ãäœæããããšã奜ã¿ãŸããã ãã®ãããªå€æã¯ç¬ç«ããŠãããããšãã°ããªãªãŒã¹ã«å€æ°ã®å€æãååšããå Žåã1çš®é¡ã®æ§æã«å¯ŸããŠè€æ°ã®å€æãå®è¡ããå¿ èŠãããããšãæå³ããå¯èœæ§ããããŸããå®å šã«ãªãã·ã§ã³ã®æé ãæ°åç¹°ãè¿ããŸãã
éçºè ã«ãšã£ãŠã¯ãéçºäžã«äœ¿çšããããã¹ãããŒã¿ã®ãµã€ãºãéåžžã«å°ããããããã®æäœã¯çæéã§å®äºããŸããã å®éã®ã·ã¹ãã ã«ãã£ãŠä¿åãããå®éã®æ§æã®ãµã€ãºã¯ãæ°æ¡å€§ãããªããŸããïŒ100ãããã€ããã1ã2ã¡ã¬ãã€ããããŒã¿ããŒã¹ã®åèšãµã€ãºã¯æ倧1ã2 GBïŒã ã·ã¹ãã ã®æ°ããããŒãžã§ã³ãžã®ç§»è¡ã¯ãåã³ã客æ§ã«ãšã£ãŠå€§ããªåé¡ã«ãªããŸããã

ãã©ã¡ãŒã¿ãŒã®æ°ãå¯èœãªãªãã·ã§ã³ã®æ°ãã¯ã©ã€ã¢ã³ãã®æ°ãªã©ãå¢å ããã«ã€ããŠãæ ŒçŽãããXMLã®å€æã«é¢äžããã³ãŒãã®è€éãã¯çµ¶ããå¢å ããŠããŸããã ã¢ããªã±ãŒã·ã§ã³ããžãã¯ã®èŠ³ç¹ããã¯ããã³ãŠã¢ãªãã®åºçŸãåçŽãªäžæ£ãªæ§æã«ã€ãªãããšã©ãŒãçºçããŸããã ãããã®åé¡ã®ã»ãšãã©ã¯é ãããŠãããæãè€éã§æŽç·Žãããå Žåã«ã®ã¿ãæ倧ãã€æã䟡å€ã®ãã顧客ã®éã§çŸããŸããã éçºäžã«ããŒã¿ããŒã¹ã®å€æãæåã§éå§ããããããç¶æ³ã¯è€éã§ããã 次ã«ã次ã®ãããªãã¯ããŒãžã§ã³ã®ãªãªãŒã¹åã«ãéçºè ã®1人ãããŒã¿ããŒã¹ã1ã€ã®ã¢ããªã±ãŒã·ã§ã³ã«å€æããããã®ãã¹ãŠã®ã³ãŒããåéããæçµãã«ããäœæããŸããã èšå€§ãªæ°ã®ãªãã·ã§ã³ãšéåžžã«å³ããïŒãã€ãã®ããã«ïŒæéæ ããããããã·ã¹ãã ã®ãã¹ãŠã®ãã¥ã¢ã³ã¹ããã¹ãããããšã¯ã§ããŸããã§ããã ã¯ã©ã€ã¢ã³ãã¯ããã°ãããŒã¿ããŒã¹ã®æ倱ïŒããã¯ã¢ããã®åŠçãå¿ããå ŽåïŒãåé¡ã®ãããã©ã³ãã«å°éããåŸã®ããŒã¿ããŒã¹ã®æ倱ãªã©ãèŠã€ããŸããã
ã°ããŒãã«ãã«ãã²ãã³ãé·ãé説æããããšã¯å¯èœã§ãã次ã®ãªãªãŒã¹åŸãéçºè ã¯æ°é±éãããŠé¡§å®¢ããŒã¿ããŒã¹ã®æ§æãæåã§ç·šéãããšããèšããŸããã å šäœçãªç¶æ³ãè ããããŠããŸããã
解決ç
ä»åãæããé ã¯ãã°ããã®é圌ãã®æ¯é ãçã£ãããåŸæ»ãã¯ãªãã£ãã ç¹°ãè¿ãã«ãªããŸãããã·ã¹ãã ã®ã°ããŒãã«ãªåèšèšã¯èšå€§ãªéã®äœæ¥ã®ããäžå¯èœã§ããã é·æã«ãããäŒè°ã決å®ããåŸïŒ
- ãã«ãéããã³éçºäžïŒãã¹ãäžïŒã«ã¢ããã°ã¬ãŒãã®æŠå¿µãå°å ¥ããå°æ¥çã«é¡§å®¢ã䜿çšããã¡ã«ããºã ã䜿çšãã
- æ§æãå€æããã³ãŒããæ éã«èšè¿°ãã
- 顧客ããŒã¿ããŒã¹ã䜿çšããŠã·ã¹ãã ãããéäžçã«ãã¹ãããïŒãã¹ãã³ã¹ããå€§å¹ ã«å¢å ããïŒ
å¹æ
ãã®å¹æã¯éèŠã§ã¯ãããŸããã§ãããããã«ãæçµçã«ïŒæçµçã«ïŒã·ã¹ãã ãã¢ããã°ã¬ãŒãããã©ã€ãã¿ã¹ã¯ã§ã·ã¹ãã ããã¹ãããã®ã¯é¡§å®¢ã®ã¡ãªããã§ããã

ã¿ã€ã ã©ã€ã³ïŒæçããã·ã¹ãã
ã·ã¹ãã ã¯åŒãç¶ã販売ããããŸããŸãè€éã«ãªããŸããã ã¯ã©ã€ã¢ã³ãã¯åé¡ã«ææ ¢ãããµããŒããµãŒãã¹ã¯ã§ããéãã®ããšãè¡ããå€ãã®å Žåãéçºè ã«åé¡ãæž¡ããŸãããªããªãã圌ãã ããæã§ããŒã¹ãä¿®æ£ããããšããããã§ãã å奜çãªé°å²æ°ã®äžã§ãããŸããŸãªããããç»å Žãã人ã ã¯ç¹å®ã®åé¡ãé²ãäœæ¥çšã®ãåªæãã亀æããŸããã äžèšã§èšãã°-人çã¯æ¬æ Œçã ã£ãã
ãã®æ®µéã§ã®åé¡
ãã®æ®µéã§ãã¿ã¹ã¯ã¯ãæ°ããããŒãžã§ã³ã«åãæ¿ããéã®é·ãæŽæ°ã®åé¡ã解決ããããŒã¿ããŒã¹ã®æŽæ°ããžãã¯ãåçåããä»ã®ããŒã ã®äœæ¥ãç°¡çŽ åããããã«èšå®ãããŸããã
ããã«ãäžéšã®ïŒç¹ã«ã¢ã¯ãã£ããªïŒã¯ã©ã€ã¢ã³ãã¯ãæ§æãµã€ãºã10ã¡ã¬ãã€ãã«ãç·ããŒã¿ããŒã¹ãµã€ãºã5ã®ã¬ãã€ãã«åŒãäžããåŸãéåžžã«èå³æ·±ãåé¡ã®æ°ããã¯ã©ã¹ã«ééããŸããã å³ãå®æãããããã«ããªãŒããŒã·ããã以åã®ããŒãžã§ã³ã®ããã€ã¹ãšäºææ§ã®ããã·ã¹ãã ãæã«å ¥ããããšãæãããšãã§ããŸãã åžžã«ãããã€ã¹ãšå¶åŸ¡ã·ã¹ãã ã¯åæããŠéçºãããŸããã äŸïŒSystem.1ã¯æ§æãDevice.1ã«éä¿¡ããSystem.2ã¯Device.2ã«éä¿¡ããŸãã ã¿ã¹ã¯ã¯ãSystemã4ãæ£ããæ§æãããã€ã¹ã«éä¿¡ããæ©äŒãæäŸããããã«èšå®ãããŸããã ã¡ãªã¿ã«ãéãã¯ãã°ãã°éåžžã«éèŠã§ããã
解決ç
æ§æå€æããžãã¯ãäœæããããã«ãç¹ã«å段éã§è¡ãããå€æŽã®æ£ç¢ºæ§ãæ€èšŒã§ããç¹å¥ãªã¡ã«ããºã ãå®è£ ããç ŽæããããŒã¹ã®åºçŸãé²æ¢ããŸããã 補åå šäœããã¹ãããã³æ€èšŒããããã®èªååãããã·ã¹ãã ãæ©èœããçè«äžã®ã¿é ããããå Žåã«ãã£ãŠã¯èµ·ããããåé¡ãæããã«ããŸããã
æ§æãã¢ãŒã«ã€ã圢åŒã§ä¿åãå§ãããµã€ãºã®åé¡ãšèªã¿åãããã³å€æé床ã®åé¡ã®äž¡æ¹ã解決ããŸããïŒããã»ããµã®ããã©ãŒãã³ã¹ã¯åäžããŠããŸããããã£ã¹ã¯ãµãã·ã¹ãã ã¯ã²ã©ããã¬ãŒãã§ãã£ããããããŒã¿ããŒã¹ïŒMySQLïŒã®ããã©ãŒãã³ã¹ã¯æ¬åœã«åäžããŸããïŒã å®å®ãããããã°ãããæŽæ°ã¡ã«ããºã ã䜿çšããŠãéå€æã¡ã«ããºã ãå®è£ ãããç°ãªãããŒãžã§ã³ã®ããã€ã¹ããµããŒãã§ããããã«ãªããŸããã ãã®å Žåãèªåãã¹ãã䜿çšãããŸããã éçºè ã®ç掻ã¯ããšããããå¶åŸ¡ã·ã¹ãã ãéä¿¡ãããã®ã衚瀺ããã ãã§ãªããåä¿¡ããæ§æããã§ãã¯ããŠæœåšçãªãšã©ãŒã瀺ããŠãããŒãµã«ããã€ã¹ãšãã¥ã¬ãŒã¿ãŒã«ãã£ãŠå€§å¹ ã«ç°¡çŽ åãããŸããã

ã¬ããŒãžã¯ãã¹ãŠã®ã¯ã©ã€ã¢ã³ãã®ããŒã¿ããŒã¹ããåé€ãããåŸããµã€ãºãäžæ¡å°ãããªããæ°ããããŒãžã§ã³ã®ã€ã³ã¹ããŒã«æéãå€§å¹ ã«ççž®ãããŸããã ããã«ãããããããæãããªçç±ã§ãéåžžã«åæã®æ®µéã§å·§åŠãã€éåžžã«æ éã«èšèšããããã¹ãŠã®åé¡ã解決ããããšã¯ã§ããŸããã§ããã
ãããã«
äœè ã¯ãã®ãããžã§ã¯ããããªã貧ããç¶æ ã§åãåããŸããã ãããžã§ã¯ããšäžç·ã«ãæ°çŸã®ãã°ãå®éã®ã¯ã©ã€ã¢ã³ããããã³äžäœäºææ§ãåããã·ã¹ãã ã«å¯Ÿããã²ã©ãèŠæ±ãæ°ããé害ã®ããã¢ãžã£ã€ã«ãžã®ãã¡ãŒã å šäœã®é©å¿ãªã©ãè¿œå æ©èœã«å¯Ÿããå€ãã®èŠæ±ãå¯ããããŸããã ãšããã§ãé·ãéååšããŠãã倧èŠæš¡ãããžã§ã¯ãã®ç¶ç¶ççµ±åã®å®è£ ãšãåã³ãããåŸã«ãã§ãã¯ã§ãããã¹ãŠã®ãã§ãã¯ã¯ãå¥åã®éåžžã«èå³æ·±ããããã¯ã§ãã 圌ãã¯åªããããŒã ãšç¡éã®æ¥œèŠ³äž»çŸ©ã®ãããã§ãã¿ã¹ã¯ã«å¯ŸåŠããããšãã§ããŸããã å€ãã®ãã°ãä¿®æ£ãããŸããïŒ

éçºããã»ã¹ã¯éåžžã«ç±å¿ã§ããã

2ã€ã®ã·ã¹ãã ããã®å®éã®ã¯ã©ã€ã¢ã³ãã¯ãè²»çšã®ãããã¡ã³ããã³ã¹ãå¿ èŠãšããã匷å¶çã«éã¢ã¯ãã£ããªæéãæå°éã«æããæãå®å®ãã䟿å©ãªãªãã·ã§ã³ãéžæããããšã«æ³šæããŠãã ããã ãµãŒãã¹åæ¢ãå¿ èŠãšãã21äžçŽã®ã·ã¹ãã ãéçºããããšã¯ããå¥åŠã§ãã æ°æéãã1æ¥ãŸã§ãåãã€ããã·ã¹ãã ãéçºããããšã¯ãå°ãªããšãæãã§ãã
次ã®èšäºïŒæ©äŒãããã°ïŒã§ãèè ã¯ãŒãããäœæããããã®èšäºã§èšåãããã»ãšãã©ãã¹ãŠã®åé¡ããªãå¥ã®ã·ã¹ãã ã§äœæ¥ããããšã«ã€ããŠè©±ããŸãã æ°ããèšèšã«ãããéçºãšãã¹ãã®æéãå€§å¹ ã«ççž®ãããæ°æé以å ã«æŽæ°ãããã¢ã»ã³ããªãæäŸã§ããŸãã åœç¶ãããŒã¿ããŒã¹ã¯ãŸã 䜿çšãããŠããŸãããæ°ããããŒãžã§ã³ã«ã¢ããã°ã¬ãŒãããå Žåãè¿œå ã®æé ã¯å¿ èŠãããŸãã;ãã¹ãŠãééçã«ãå®å®ããŠãè¿ éã«è¡ãããŸãã
ããŒãã¹
XMLããŒã¿ããŒã¹ã«æ ŒçŽãããŠããããã¥ã¡ã³ããæŽæ°ããåé¡ã解決ãããªã©ãXSLTå€æã䜿çšãããªãã·ã§ã³ãæ€èšãããŸããã ãã®ãœãªã¥ãŒã·ã§ã³ã¯é åçã§æåããŠããããã§ãããã€ãã®æé©åææ³ã䜿çšã§ããŸããã ããšãã°ãããã€ãã®å€æãã³ã³ãã¢ã®åœ¢ã§è¡šãããšãã§ããååãªæ°ãããå Žåã¯ãé¡èãªããã©ãŒãã³ã¹ã®åäžãåŸãããŸãã 以äžã¯ãå°èŠæš¡ã®è©äŸ¡ãã¹ãã®çµæã§ãã ãã¹ã1ã5ã¯ãåŠçãããããŒã¿ã®ãµã€ãºãç°ãªããŸãã çµæãè¡åã®æéã究極ã®çå®ãšããŠåãåããªãã§ãã ããã
