<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

    主站蜘蛛池模板: 色多多www视频在线观看免费| 亚洲国产精品综合福利专区| 豆国产96在线|亚洲| 在线a毛片免费视频观看| 亚洲性无码av在线| av无码免费一区二区三区| 亚洲码在线中文在线观看| 日本最新免费网站| 91丁香亚洲综合社区| 久久精品a一国产成人免费网站| 亚洲天然素人无码专区| 永久久久免费浮力影院 | 亚洲AV无码乱码国产麻豆| 国产情侣久久久久aⅴ免费 | 亚洲裸男gv网站| 男女一边桶一边摸一边脱视频免费 | 亚洲日韩国产一区二区三区在线| 最近中文字幕mv免费高清视频7| 一本色道久久88—综合亚洲精品 | 久9这里精品免费视频| 亚洲视频一区在线播放| 在线免费观看a级片| 美女羞羞喷液视频免费| 日韩亚洲变态另类中文| 久久久免费精品re6| 亚洲AV无码一区二区三区在线 | 亚洲午夜国产精品无码老牛影视| 两个人看的www免费视频| 亚洲三级电影网址| 成人性生免费视频| 三级片免费观看久久| 老司机亚洲精品影院| 免费网站看v片在线香蕉| 成人免费无码H在线观看不卡| 久久久久亚洲精品无码蜜桃| 搡女人真爽免费视频大全| 日本高清免费中文在线看| 亚洲人成电影福利在线播放| 成人免费无码大片A毛片抽搐色欲| 免费国产黄网站在线看| 亚洲视频在线观看网站|