developer zone - ¼ò½é - mongodbÖ¸ÄÏ£¨·Ò룩£¨¶þ£©
ÔÎÄ£ºhttp://www.cnblogs.com/xinghebuluo/archive/2011/11/25/2266200.html
¼ò½é
mongodbÊÇÒ»¸öÃæÏò¼¯ºÏ£¬Ä£Ê½Áé»îµÄÎĵµÐÍÊý¾Ý¿â¡£
ËùνÃæÏò¼¯ºÏ£¬ÊÇ˵Êý¾Ý±»·Ö×é´æ´¢ÔÚ±»³Æ×÷¼¯ºÏµÄÊý¾Ý¼¯ÖС£Ã¿¸ö¼¯ºÏÔÚÊý¾Ý¿âÖж¼ÓÐÒ»¸öΨһµÄ±êʶÃû£¬²¢ÇÒ¿ÉÒÔ°üº¬ÎÞÏÞÊýÄ¿µÄÎĵµ¡£¼¯ºÏµÄ¸ÅÄîÀàËƹØϵÐÍÊý¾Ý¿â£¨RDBMS£©ÀïµÄ±í£¨table£©£¬²»Í¬µÄÊÇËü²»ÐèÒª¶¨ÒåÈκÎģʽ¡£
Ëùνģʽ×ÔÓÉ£¨schema-free)£¬ÊÇ˵¶ÔÓÚ´æ´¢ÔÚmongodbÊý¾Ý¿âÖеÄÎļþ£¬ÎÒÃDz»ÐèÒªÖªµÀËüµÄÈκνṹ¶¨Òå¡£Èç¹ûÐèÒªµÄ»°£¬ÄãÍêÈ«¿ÉÒ԰Ѳ»Í¬½á¹¹µÄÎļþ´æ´¢ÔÚͬһ¸öÊý¾Ý¿âÀï¡£¡¡¡¡
ËùνµÄÎĵµ£¬ÊÇ˵´æ´¢ÔÚ¼¯ºÏÖеÄÎĵµ£¬±»´æ´¢Îª¼ü-Öµ¶ÔµÄÐÎʽ¡£¼üÓÃÓÚΨһ±êʶһ¸öÎĵµ£¬Îª×Ö·û´®ÀàÐÍ£¬¶øÖµÔò¿ÉÒÔÊǸ÷ÖÖ¸´ÔÓµÄÎļþÀàÐÍ¡£ÎÒÃdzÆÕâÖÖ´æ´¢ÐÎʽΪBSON£¨Binary Serialized dOcument Format£©¡£
MongoDB ʹÓøÅÊö
mongodbÊÇÒ»¸ö¿ÉÒÔÔËÐÐÔÚlinux¡¢windowsºÍOS XÉÏÃæµÄ·þÎñÆ÷½ø³Ì¡£Ëü¿ÉÒÔ×÷ΪӦÓÃÔËÐÐÔÚ32λ»òÕß64Ϊ²Ù×÷ϵͳÉÏÃæ¡£ÓÉÓÚÔÚ32λģʽÏÂÃæmongo½«ËùÓеÄÊý¾Ý¿âµÄ×ÜÊý¾Ý´óСÏÞ¶¨ÔÚ2GB£¬ÎÒÃÇÍƼöÒÔ64λģʽÔËÐС£
mongodb½ø³ÌĬÈϼàÌýµÄ¶Ë¿ÚºÅÊÇ27017£¨ÌáÐÑһϣ¬¶Ë¿ÚºÅ¿ÉÒÔÔÚÆô¶¯µÄʱºòÉèÖ㬿ÉÒԲμӡ°ÃüÁîÐвÎÊý¡±»ñÈ¡¸ü¶àÐÅÏ¢£©¡£
¿Í»§¶ËÁ¬½Óµ½·þÎñÆ÷½ø³Ì£¨Èç¹û°²È«Ñ¡Ïî´ò¿ªÁËÔòÐèÒª½øÐÐÈÏÖ¤£©£¬È»ºóÖ´ÐÐÁ¬ÐøµÄ²Ù×÷£¬Èç²åÈë¡¢²éѯºÍ¸üС£
mongodb½«Êý¾Ý´æ´¢ÔÚÎļþÖУ¨Ä¬ÈϵÄ·¾¶ÊÇ/data/db/£©£¬ÎªÁËÌá¸ßЧÂÊʹÓÃÁËÄÚ´æÓ³ÉäÎļþÀ´×öÊý¾Ý¹ÜÀí¡£
mongodb²»½ö¿ÉÒÔÅäÖÃΪÔ×ÓÊý¾Ý¸´ÖÆ£¬¶øÇÒ»¹ÄÜÅäÖÃΪÔ×ÓʧЧ±¸Ô®¡£
mongodbµÄ¹¦ÄÜ
mongodbΪ¿ª·¢ÕßÌṩÁË·¶Î§·á¸»µÄ²Ù×÷£º
- ²éѯ£ºÖ§³Ö»ùÓÚ²éѯ¶ÔÏó»òÕßÀàËÆÓÚSQL¡°where predicates¡±¡£²éѯ½á¹û¿ÉÒÔ½øÐÐÅÅÐò£¬ÉèÖ÷µ»Ø¸öÊý£¬Ìø¹ý²¿·Ö²éѯ½á¹û£¬»¹¿ÉÒÔÖ»·µ»ØÎĵµµÄ²¿·ÖÄÚÈÝ¡£
- ²åÈëºÍ¸üУº²åÈëеÄÎĵµ£¬¸üÐÂÒѾ´æÔÚµÄÎĵµ¡£
- Ë÷Òý¹ÜÀí£ºÔÚÎĵµÉÏÃæ´´½¨°üº¬Ò»¸ö»òÕ߶à¸ö¹Ø¼ü×ÖµÄË÷Òý£¬Ò²¿ÉÒÔʹÓùؼü×ÖµÄ×ӽṹÄÚÈݽ¨Á¢Ë÷Òý£¬É¾³ýË÷ÒýµÈ¡£
- ³£¹æÃüÁÈκεÄmongodb²Ù×÷¶¼¿ÉÒÔʹÓÃDBÃüÁîͨ¹ýÍøÂçÀ´Íê³É¡£
ÍƼöÐÅÏ¢
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- php³£ÓÃÕýÔò±í´ïʽ
- phpÐÔÄܼà²âÄ£¿éXHProf
- ÈÃCI¿ò¼ÜÖ§³Öservice²ã
- ʹÓÃPHPÉú³É´øLOGOµÄ¸öÐÔ»¯¶þάÂëͼÏñ
- ¹ØÓÚCodeIgniterÄã¿ÉÄܲ»ÖªµÀµÄ5¸ö֪ʶµã
- Memcache ºÁÃ뼶³¬Ê±¼°ÆäËû³£¼ûÎÊÌâ»ã×Ü
- [PHP±Ê¼Ç]PHPQueryÒ»¸ö´¦ÀíDOMµÄÀûÆ÷
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- PHP»ñÈ¡Óû§µÄÕæʵIP£¬²¢ÅжÏÊÇ·ñÄÚÍøIP
- PHP ´íÎóÈÕÖ¾ error_log
- ÀûÓÃbigpipe»úÖÆʵÏÖÒ³ÃæÄ£¿éµÄÒì²½äÖȾ chunked¼¼Êõ
- php¿ØÖÆÎļþÏÂÔØËÙ¶È
- js + php ¶ÁÈ¡¡¢²¥·ÅÊÓƵÁ÷ ¼æÈÝfirefox£¬c....
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- UNICODE Óë UTF-8 µÄ¹Øϵ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- phpʹÓÃmb_detect_encoding¼ì²â×Ö·û´®±àÂë
ÆÀÂÛ