Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-9247

Small modification to Data storage scheme

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Performance
    • Labels:
      None

      Description

      It is known that data is stored in the form of JSON documents which contain "fieldname:value" format of data in it. Generally it is recommended to give small field names as they are stored in each and every document and hence the overall size of database may be increased because of field names itself.

      Why cant we maintain a table/document for every collection which contains the list of "number:its_actual_fieldname" and if every field name of all the documents of that collection are internally stored with its corresponding number only.

      For example:

      {first_name:kumar, last_name:K}

      is stored as

      {#1:kumar, #2:K}

      and the collection will maintain the information as #1:first_name, #2:last_name. So, whenever any document of that collection is requested, it verifies the list and replaces the numbers/codes with their respective field names and then displays to the user. By this we can increase the readability of the field names and also can efficiently eliminate the redundant storage of field names.

      (Please don't mind if this is not a proper place to discuss such issues and let me know about it)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              kumar kumar
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: