<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Chan Chen Coding...

    Basic Term of MongoDB

    Document
    MongoDB can be thought of as a document-oriented database. By 'document', we mean structured documents, not freeform text documents. These documents canbe thought of as objectsbut only the data of an object, not the code, methods or class hierarchy. Additionally, there is much less linking between documents in MongoDB data models than there is between objects in a program written in an object-oriented programming language.
    In MongoDB the documents are conceptually JSON. More specifically the documents are represented in a format calledBSON(standing for Binary JSON).
    Documents are stored inCollections.
    Maximum Document Size
    MongoDB limits the data size of individual BSON objects/documents. At the time of this writing the limit is 16MB.
    This limit is designed as a sanity-check; it is not a technical limit on document sizes. The thinking is that if documents are larger than this size, it is likely the schema is not ideal. Further it allows drivers to make some assumptions on the max size of documents.
    The concept is that the maximum document size is a limit that ensures each document does not require an excessive amount of RAM from the machine, or require too much network bandwidth to fetch. For example, fetching a full 100MB document would take over 1 second to fetch over a gigabit ethernet connection. In this situation one would be limited to 1 request per second.
    Over time, as computers grow in capacity, the limit will be adjusted upward.
    Collection
    MongoDB collections are essentially named groupings of documents. You can think of them as roughly equivalent to relational database tables.
    A MongoDB collection is a collection ofBSONdocuments. These documents usually have the same structure, but this is not a requirement since MongoDB is a schema-free (or more accurately, "dynamic schema") database. You may store a heterogeneous set of documents within a collection, as you do not need predefine the collection's "columns" or fields.
    A collection is created when the first document is inserted.
    Collection names should begin with letters or an underscore and may include numbers; $ is reserved. Collections can be organized in namespaces; these are named groups of collections defined using a dot notation. For example, you could define collections blog.posts and blog.authors, both reside under "blog". Note that this is simply an organizational mechanism for the user -- the collection namespace is flat from the database's perspective.
    The maximum size of a collection name is 128 characters (including the name of the db and indexes). It is probably best to keep it under 80/90 chars.
    Namespace
    MongoDB stores BSON objects in collections. The concatenation of the database name and the collection name (with a period in between) is called a namespace.
    For example, acme.users is a namespace, where acme is the database name, and users is the collection name. Note that periods can occur in collection names, so a name such as acme.blog.posts is legal too (in that case blog.posts is the collection name.

     



    -----------------------------------------------------
    Silence, the way to avoid many problems;
    Smile, the way to solve many problems;

    posted on 2012-02-18 15:52 Chan Chen 閱讀(212) 評論(0)  編輯  收藏 所屬分類: DB

    主站蜘蛛池模板: 亚洲视频在线观看网址| 亚洲国产成人久久综合区| 亚洲av鲁丝一区二区三区| 中文字幕高清免费不卡视频| 亚洲精品偷拍视频免费观看| 国产亚洲情侣久久精品| 亚洲福利精品一区二区三区 | 最近2019中文免费字幕| 亚洲精品免费在线视频| 精品女同一区二区三区免费站| 亚洲美女大bbbbbbbbb| 国产精品免费观看| 在线观看日本亚洲一区| 国产乱子伦精品免费女| 日本黄页网址在线看免费不卡| 亚洲伊人久久成综合人影院| 99久久免费国产精品热| 亚洲日本中文字幕区| 在线视频免费观看高清| 爱情岛亚洲论坛在线观看| 丝袜熟女国偷自产中文字幕亚洲| 最近免费中文字幕MV在线视频3| 久久香蕉国产线看观看亚洲片| 1000部啪啪未满十八勿入免费| 亚洲 欧洲 日韩 综合在线| 免费乱码中文字幕网站| 国产一精品一av一免费爽爽| 亚洲免费观看在线视频| 又色又污又黄无遮挡的免费视| 99精品免费视品| 亚洲色大成网站www| 亚洲一区二区三区无码影院| 91av在线免费视频| 亚洲欧美在线x视频| 亚洲爆乳精品无码一区二区三区| 日本成年免费网站| 一个人看的免费观看日本视频www 一个人看的免费视频www在线高清动漫 | 国产一卡二卡≡卡四卡免费乱码| 巨胸喷奶水视频www免费视频| 亚洲成人福利在线| 国产亚洲大尺度无码无码专线 |