<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:03:20 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-3536] templates for schemas</title>
                <link>https://jira.mongodb.org/browse/SERVER-3536</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;The user is said to gain more &quot;flexibility&quot; in a schema-less database.  However the option to gain schema-based advantages are NOT available.  Proposal:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Create document &quot;templates&quot; that list all fields and default values for a specific type of database write or read.&lt;/li&gt;
	&lt;li&gt;Create &quot;subset templates&quot; that reference a template and represent a subset of its information.&lt;/li&gt;
	&lt;li&gt;Documents written from a template are indicated as such, but lose this status on their first non-template write.&lt;/li&gt;
	&lt;li&gt;Compare templates at declaration time; writes on the same document from multiple templates preserve flags if those templates do not conflict.&lt;/li&gt;
	&lt;li&gt;Queries using a template return only documents written with a compatible template (original or subset)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This would provide guaranteed queries (skip those pesky membership tests) and assist developers in planning and maintaining a mongodb instance by simplifying and solidifying common and/or boilerplate data operations.&lt;/p&gt;</description>
                <environment></environment>
        <key id="20513">SERVER-3536</key>
            <summary>templates for schemas</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="backlog-server-query">Backlog - Query Team</assignee>
                                    <reporter username="khabok">Jason Voorhees</reporter>
                        <labels>
                            <label>insert</label>
                            <label>query</label>
                            <label>schema</label>
                            <label>update</label>
                    </labels>
                <created>Thu, 4 Aug 2011 20:50:58 +0000</created>
                <updated>Tue, 6 Dec 2022 05:41:51 +0000</updated>
                            <resolved>Tue, 6 Mar 2018 02:38:46 +0000</resolved>
                                                                    <component>Storage</component>
                                        <votes>9</votes>
                                    <watches>27</watches>
                                                                                                                <comments>
                            <comment id="1824003" author="asya" created="Tue, 6 Mar 2018 02:38:31 +0000"  >&lt;p&gt;3.6 added support for JSON Schema both as query operator and schema validation syntax.&lt;/p&gt;

&lt;p&gt;This seems to address many of the asks in this ticket - ability to only allow documents that match the schema, or optionally accepting ones that don&apos;t with a warning logged, plus ability to query for documents that match a particular schema.&lt;/p&gt;

&lt;p&gt;I&apos;m going to close this ticket - components of original request that aren&apos;t addressed by JSON Schema (providing default values for fields not set) should be tracked by separate smaller/more narrowly defined tickets (some already exist list &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-24430&quot; title=&quot;Allow default values to be set for new documents&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-24430&quot;&gt;SERVER-24430&lt;/a&gt; for setting default).&lt;/p&gt;
</comment>
                            <comment id="813943" author="mbennett@uecomm.com.au" created="Mon, 26 Jan 2015 23:59:30 +0000"  >&lt;p&gt;As noted in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-17049&quot; title=&quot;Allow $ref and $schema keywords to support JSON Schema management&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-17049&quot;&gt;&lt;del&gt;SERVER-17049&lt;/del&gt;&lt;/a&gt; (despite being marked as duplicate when it wasn&apos;t meant to appear as one): as a minimum support for JSON Schema the two $ prefixed fields $schema and $ref, from the JSON schema draft 3 and above would need to be added as valid keys requiring a fully qualified URI as a value. Also potentially being added in draft-5 is $data requiring a Relative JSON Pointer as a value (potentially there could be a sub-task created to provide an option to resolve these $data pointers when querying).&lt;/p&gt;

&lt;p&gt;I&apos;m not as concerned with these being part of this issue and would prefer the other issue re-opened, but this is needed simply to store JSON Schemas in Mongo &lt;b&gt;at all&lt;/b&gt;, like for a Node application for managing Schema records.&lt;/p&gt;</comment>
                            <comment id="812519" author="mbennett@uecomm.com.au" created="Sat, 24 Jan 2015 06:24:25 +0000"  >&lt;p&gt;I would rather see JSON Schema used with one non-standard element than something completely incompatible. My workplace is investing more and more in JSON Schema tools and re-implementing things like product catalogues using JSON Schema and we&apos;ve never really used any non-standard JSON when using Mongo, so we could get away with fully standard JSON Schema, so if there&apos;s only a few core types to add, then please make JSON Schema an option!&lt;/p&gt;</comment>
                            <comment id="759396" author="asya" created="Fri, 7 Nov 2014 23:18:49 +0000"  >&lt;p&gt;Our documents are extended JSON since we store more types than JSON understands, so I&apos;m not sure any standard will be able to handle it, unless it allows types that are more extensive than what JSON supports.&lt;/p&gt;

&lt;p&gt;Allowing something like a query that any document going into the collection would have to satisfy seems like the most flexible yet covering all use cases (as long as you can specify if it&apos;s strict or minimal - i.e. are fields not in query document allowed or not allowed).&lt;/p&gt;</comment>
                            <comment id="759387" author="daniel.coupal" created="Fri, 7 Nov 2014 22:57:59 +0000"  >&lt;p&gt;Closing &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-14481&quot; title=&quot;Validating schema on the server side&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-14481&quot;&gt;&lt;del&gt;SERVER-14481&lt;/del&gt;&lt;/a&gt; as a duplicate, however adding the information that it would be nice to use a standard like &lt;a href=&quot;http://json-schema.org&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;JSON Schema validation&lt;/a&gt; to represent the constraints.&lt;/p&gt;</comment>
                            <comment id="683017" author="tubededentifrice" created="Wed, 6 Aug 2014 18:19:33 +0000"  >&lt;p&gt;IMO &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-863&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-863&lt;/a&gt; is asking pretty much the same thing (duplicate?) in a more &quot;NoSQL&quot; way. It would be even easier to check if a field exist or not (is it present or not in the hashmap?).&lt;br/&gt;
Also, the feature requested by Hari would be very easy to implement (freeze automatic hashmap updates).&lt;br/&gt;
However those feature requests are 4 years old/2 years old, and I don&apos;t really think they will ever be implemented... even if they would lead to major improvements in term of memory consumption...&lt;/p&gt;</comment>
                            <comment id="683005" author="thomasr" created="Wed, 6 Aug 2014 18:11:53 +0000"  >&lt;p&gt;With such schema templates, we could also look at performance improvements for certain edge cases. For example building a sparse index on a non-existing field would not have to iterate documents in a collection, see &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-14772&quot; title=&quot;Create a way to add an empty sparse index, skipping iteration of the collection&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-14772&quot;&gt;&lt;del&gt;SERVER-14772&lt;/del&gt;&lt;/a&gt;. We could just add the empty index, after which the user could modify the schema template and allow future documents to contain the field.&lt;/p&gt;</comment>
                            <comment id="550678" author="hari.dosapati@credit-suisse.com" created="Tue, 15 Apr 2014 20:19:50 +0000"  >&lt;p&gt;This a big concern from the maintainance to adapt Mongo DB. In simple terms, we are looking for some thing like this&lt;/p&gt;

&lt;p&gt;Would like to freeze the schema(collection) and no client should add any unknown property to the collection after that. &lt;/p&gt;</comment>
                            <comment id="112099" author="eliot" created="Fri, 20 Apr 2012 19:33:31 +0000"  >&lt;p&gt;Not sure we&apos;ll do exactly this, but definitely something with similar motivation.&lt;/p&gt;</comment>
                            <comment id="112053" author="chengas123" created="Fri, 20 Apr 2012 18:10:13 +0000"  >&lt;p&gt;Being able to optionally have a schema on some collections would be very nice.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="136495">SERVER-13949</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="145839">SERVER-14481</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="180727">SERVER-17049</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="11679">SERVER-863</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25143"><![CDATA[Query]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 20 Apr 2012 18:10:13 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 49 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            5 years, 49 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>asya.kamsky@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-server-query</customfieldvalue>
            <customfieldvalue>chengas123</customfieldvalue>
            <customfieldvalue>daniel.coupal@mongodb.com</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>hari.dosapati@credit-suisse.com</customfieldvalue>
            <customfieldvalue>khabok</customfieldvalue>
            <customfieldvalue>mbennett@uecomm.com.au</customfieldvalue>
            <customfieldvalue>thomas.rueckstiess@mongodb.com</customfieldvalue>
            <customfieldvalue>tubededentifrice</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrouiv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr9cc7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6103</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hs3533:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>