¶©Æ±·½Ê½ Ʊ¶î¼Û¸ñ ¸ºÔ𠸺Ôð ƱµÄ±àºÅ Ʊ¶î¼Û¸ñ ¶©Æ±Ê±¼ä ƱµÄ±àºÅ ƱµÄÖÖÀà ¶©Æ±´¦ ƱµÄ¼Û¸ñ ƱµÄÊýÁ¿ ÊÛ Æ±´¦ ÊÛƱʱ¼ä ƱµÄ±àºÅ ÓµÓÐ ¸öÈËƱ ÓµÓÐ ÊÛƱµØµã ¶©Æ±·½Ê½ ¶©¹º ÓµÓÐ ÓµÓÐ ¹ºÂò ¶©Æ±ÂÃ¿Í Æ±µÄ¼Û¸ñ ÍÅÌåƱ ¹ºÆ±ÂÃ¿Í Æ±µÄÊýÁ¿ ƱµÄÖÖÀà ƱµÄ±àºÅ ƱµÄ±àºÅ ¹ºÆ±µØµã ¹ºÆ±ÊýÁ¿ ¹ºÆ±½ð¶î ƱµÄ±àºÅ
¶©Æ±½ð¶î ¶©Æ±ÊýÁ¿
µÚËÄÕ Âß¼½á¹¹µÄÉè¼Æ
4.1Âß¼½á¹¹µÄÉè¼Æ²½ÖèÓëͼʾ
¸ÅÄî½á¹¹ÊǶÀÁ¢ÓÚÈκÎÒ»ÖÖÊý¾ÝÄ£Ð͵ÄÐÅÏ¢½á¹¹¡£Âß¼½á¹¹Éè¼ÆµÄÈÎÎñ¾ÍÊǰѸÅÄî½á¹¹Éè¼ÆµÄºÃµÄ»ù±¾ERͼת»»ÎªÓëÑ¡ÓõÄDBMS²úÆ·ËùÖ§³ÖµÄÊý¾ÝÄ£ÐÍÏà·ûºÏµÄÂß¼½á¹¹¡£
Âß¼½á¹¹Ò»°ã·ÖΪ3¸ö²½Ö裻
1£©½«¸ÅÄî½á¹¹×ª»»ÎªÒ»°ãµÄ¹Øϵ¡¢Íø×´¡¢²ã´ÎÄ£ÐÍ£» 2£©½«×ª»»À´µÄ¹Øϵ¡¢Íø×´¡¢²ã´ÎÄ£ÐÍÏòÌض¨µÄDBMSÖ§³ÖϵÄÊý¾ÝÄ£ÐÍת£» 3£©¶ÔÊý¾ÝÄ£ÐͽøÐÐÓÅ»¯¡£
ÆäͼʾÈçÏ£º
¸ÅÄî½á¹¹ »ù±¾ER ͼ Ò»°ãÊý¾ÝÄ£ÐÍ ¹Øϵ¡¢Íø×´¡¢²ã´ÎÄ£ÐÍ Ìض¨µÄDBMSÖ§³ÖϵÄÊý¾ÝÄ£ÐÍ ÓÅ»¯µÄÊý¾ÝÄ£ÐÍ
ת»»¹æÔò DBMSµÄÌض¨ºÍÏÞÖÆ ÓÅ»¯·½·¨
4.2 E-RͼÏò¹ØϵģʽµÄת»»
ER ͼÏò¹ØϵģʽµÄת»»Òª½â¾öµÄÎÊÌâÊÇÈçºÎ½«ÊµÌåÐÍÏòʵÌå¼äµÄÁªÏµ×ª»»
Ϊ¹Øϵģʽ£¬ÈçºÎÈ·¶¨ÕâЩ¹ØϵģʽµÄÊôÐÔºÍÂë¡£
¹ØϵģÐ͵ÄÂß¼½á¹¹ÊÇÒ»×é¹ØϵģÐ͵ļ¯ºÏ¡£ERͼÔòÊÇÓÉʵÌåÐÔ¡¢ÊµÌåµÄÊôÐÔºÍʵÌåÐÍÖ®¼äµÄÁªÏµ3¸öÒªËØ×é³É¡£ËùÒÔ½«ERͼת»»Îª¹ØϵģÐÍʵ¼ÊÉϾÍÊÇÒª½«ÊµÌåÐÔ¡¢ÊµÌåµÄÊôÐÔºÍʵÌåÐÍÖ®¼äµÄÁªÏµ×ª»»Îª¹Øϵģʽ£¬ÕâÖÖת»»Ò»°ã×ñÑÈçÏÂÔÔò£º
Ò»¸öʵÌåÐÍת»»ÎªÒ»¸ö¹Øϵģʽ¡£ÊµÌåµÄÊôÐÔ¾ÍÊǹØϵµÄÊôÐÔ£¬ÊµÌåµÄÂë¾ÍÊǹØϵµÄÂë¡£
ÏÂÃæÊDZ¾ÎĵĹØϵģʽת»»£º
½«Í¼3.3×ÜÌå¸ÅÄî½á¹¹E-Rͼת»¯³É¹ØϵģÐÍÈçÏ£º
ÊÛƱ²¿ÃÅ£¨²¿ÃűàºÅ£¬ÊÛƱԱ±àºÅ£¬²¿ÃžÀíÃû£¬µç»°£¬µØÖ·£¬£© ÊÛƱԱ£¨¹¤×÷Ö¤ºÅ£¬ÐÕÃû£¬¹¤×Ê£¬µç»°£¬×¡Ö·£©
ÊÛƱ´¦ £¨ÊÛƱ²¿±àºÅ£¬Æ±µÄ±àºÅ£¬Æ±µÄ¼Û¸ñ£¬ÊÛƱµØµã£¬ÊÛƱʱ¼ä£© ¶©Æ±´¦ £¨Æ±µÄ±àºÅ£¬¶©Æ±ÀàÐÍ£¬¶©Æ±·½Ê½£¬¶©Æ±ÊýÁ¿£¬¶©Æ±½ð¶î£¬¶©Æ±µØ
µã£©
¹ºÆ±Âÿͣ¨Ëù¹ºÆ±±àºÅ£¬¹ºÆ±µØµã£¬¹ºÆ±·½Ê½£¬ÁªÏµ·½Ê½£©
¶©Æ±ÂÃ¿Í £¨¶©Æ±²¿ÃűàºÅ£¬Ëù¶©Æ±±àºÅ£¬¶©Æ±·½Ê½£¬¶©Æ±½ð¶î£¬¶©Æ±Ê±¼ä£¬¶©Æ±ÊýÄ¿£¬£©
ÍøÉÏ×¢²áÂÿͣ¨×¢²áÓû§±àºÅ£¬¶©¹ºÆ±±àºÅ£¬Óû§Ãû£¬ÁªÏµ·½Ê½£¬µØÖ·£¬ÍøÉϹºÆ±£©
¸öÈËƱ£¨Æ±µÄ±àºÅ£¬Æ±µÄ·ÖÀ࣬ƱµÄ¼Û¸ñ£¬Æ±µÄÊýÁ¿£¬£© Ö¸¶¨ÈÕƱ£¨Æ±µÄ±àºÅ£¬£¬Æ±µÄÀàÐÍ£¬Æ±µÄ¼Û¸ñ£¬Æ±µÄÊýÁ¿£© ƽÈÕƱ£¨Æ±µÄ±àºÅ£¬Æ±µÄÀàÐÍ£¬Æ±µÄ¼Û¸ñ£¬Æ±µÄÊýÁ¿£© ÍÅÌåƱÖÖÀࣨƱµÄ±àºÅ£¬Æ±µÄ¼Û¸ñ£¬Æ±µÄÊýÁ¿£© ÓÉÓÚÊý¾Ý¿âµÄÂß¼½á¹¹Éè¼Æ²»ÊÇΨһµÄ¡£ÎªÁ˽øÒ»²½Ìá¸ßÊý¾Ý¿âÓ¦ÓÃϵͳµÄÐÔÄÜ£¬»¹Ó¦¸Ã¸ù¾ÝÓ¦ÓõÄÐèÒªÊʵ±µÄÐ޸ġ¢µ÷ÕûÊý¾ÝÄ£Ð͵Ľṹ£¬Õâ¾ÍÊÇÊý¾Ý¿âÄ£Ð͵ÄÓÅ»¯¡£
4.3 Êý¾ÝÄ£Ð͵ÄÓÅ»¯
¹ØϵÊý¾ÝÄ£Ð͵ÄÓÅ»¯Í¨³£ÒԹ淶»¯ÀíÂÛΪָµ¼£» ¾ßÌå·½·¨Îª£º
1£©È·¶¨Êý¾ÝÒÀÀµ¡£
2)¶Ô¸÷¸ö¹Øϵģʽ֮¼äµÄÊý¾ÝÒÀÀµ½øÐм«Ð¡»¯´¦Àí£¬Ïû³ýÈßÓàµÄÁªÏµ¡£
3)¶ÔÕÕÊý¾ÝÒÀÀµµÄÀíÂÛ¶Ô¹ØϵģʽÖðÒ»½øÐзÖÎö£¬¿¼²ìÊÇ·ñ´æÔÚ²¿·Öº¯ÊýÒÀÀµ£¬´«µÝº¯ÊýÒÀÀµ¡¢¶àÖµÒÀÀµµÈ£¬È·¶¨¸÷¹Øϵģʽ·Ö±ðÊôÓÚµÚ¼¸·¶Ê½¡£
4)°´ÕÕÐèÇó·ÖÎö½×¶ÎµÃµ½µÄ´¦ÀíÒªÇ󣬷ÖÎö¶ÔÓÚÕâÑùµÄÓ¦Óû·¾³ÕâЩģʽÊÇ·ñºÏÊÊ£¬È·¶¨ÊÇ·ñÒª¶ÔijЩģʽ½øÐкϲ¢»ò·Ö½â¡£
5)¶Ô¹Øϵģʽ½øÐбØÒªµÄ·Ö½â£¬Ìá¸ßÊý¾Ý²Ù×÷µÄЧÂʺʹ洢¿Õ¼äµÄÀûÓÃÂÊ¡£
ÏÂÃæÊǶÔ4.1¹Øϵģʽ½øÐеÄÓÅ»¯
ÊÛƱ²¿ÃÅ£¨²¿ÃűàºÅ£¬ÊÛƱԱ±àºÅ£¬²¿ÃžÀíÃû£¬ÊÛƱ£¬¶©Æ±£¬µç»°£¬µØÖ·£¬£©
ÊÛƱԱ£¨¹¤×÷Ö¤ºÅ£¬ÐÕÃû£¬¹¤×Ê£¬µç»°£¬×¡Ö·£©
ÊÛƱ´¦£¨ÊÛƱ²¿±àºÅ£¬Æ±µÄ±àºÅ£¬Æ±µÄÀàÐÍ£¬Æ±µÄ¼Û¸ñ£¬ÊÛƱµØµã£¬ÊÛƱʱ¼ä£©
¶©Æ±´¦£¨Æ±µÄ±àºÅ£¬¶©Æ±ÀàÐÍ£¬¶©Æ±·½Ê½£¬¶©Æ±ÊýÁ¿£¬¶©Æ±½ð¶î£©
¹ºÆ±Âÿͣ¨ Ëù¹ºÆ±±àºÅ£¬¹ºÆ±ÊýÁ¿£¬¹ºÆ±½ð¶î£¬¹ºÆ±µØµã£¬¹ºÆ±·½Ê½£¬ÁªÏµ·½Ê½£©
¶©Æ±ÂÃ¿Í £¨¶©Æ±²¿ÃűàºÅ£¬Ëù¶©Æ±±àºÅ£¬¶©Æ±·½Ê½£¬¶©Æ±½ð¶î£¬¶©Æ±Ê±¼ä£¬¶©Æ±ÊýÄ¿£¬£©
ÍøÉÏ×¢²áÂÿͣ¨ ×¢²áÓû§±àºÅ£¬¶©¹ºÆ±±àºÅ£¬Óû§Ãû£¬ÁªÏµ·½Ê½£¬µØÖ·£¬ÍøÉϹºÆ±£©
¸öÈËƱ£¨Æ±µÄ±àºÅ£¬Æ±µÄ·ÖÀ࣬ƱµÄ¼Û¸ñ£¬Æ±µÄÊýÁ¿£© Ö¸¶¨ÈÕƱ£¨Æ±µÄ±àºÅ£¬£¬Æ±µÄÀàÐÍ£¬Æ±µÄ¼Û¸ñ£¬Æ±µÄÊýÁ¿£© ƽÈÕƱ£¨Æ±µÄ±àºÅ£¬Æ±µÄÀàÐÍ£¬Æ±µÄ¼Û¸ñ£¬Æ±µÄÊýÁ¿£© ÍÅÌåƱÖÖÀࣨƱµÄ±àºÅ£¬Æ±µÄ·ÖÀ࣬ƱµÄ¼Û¸ñ£©
¹æ·¶»¯ÀíÂÛÚÀÊý¾Ý¿âÉè¼ÆÈËÔ±ÅжϹØϵģʽÓÅÁӵıê×¼£¬¿ÉÓÃÀ´Ô¤²âģʽ¿ÉÄܳöÏÖµÄÎÊÌ⣬ʹÊý¾Ý¿âÉè¼Æ¹¤×÷ÓÐÁËÑϸñµÄÀíÂÛ»ù´¡¡£
µÚÎåÕ Êý¾Ý¿âÎïÀí½á¹¹Éè¼Æ
5.1ÎïÀí½á¹¹Éè¼Æ
5.1.1.´´½¨Êý¾Ý¿â
USE master GO
CREATE DATABASEÉϺ£ÊÀ²©»áƱÎñϵͳ ON
( NAME =,ÉϺ£ÊÀ²©»áƱÎñϵͳ
FILENAME = 'd:\\ ÊÛƱ²¿ÃÅ.mdf', SIZE = 30, MAXSIZE = 40,