{"id":10224,"date":"2025-08-04T08:56:24","date_gmt":"2025-08-04T15:56:24","guid":{"rendered":"https:\/\/www.couchbase.com\/developers\/tutorials\/json-design-choices\/"},"modified":"2025-08-04T08:56:24","modified_gmt":"2025-08-04T15:56:24","slug":"json-design-choices","status":"publish","type":"tutorials","link":"https:\/\/www.couchbase.com\/it\/developers\/tutorials\/json-design-choices\/","title":{"rendered":"JSON Design Choices"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Couchbase neither enforces nor validates for any particular document structure. Below are the design choices that impact JSON document design.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Document typing and versioning<\/strong>\n<ul>\n<li>Key Prefixing<\/li>\n<li>Document Management fields<\/li>\n<\/ul>\n<\/li>\n\n\n<li><strong>Document structure choices<\/strong>\n<ul>\n<li>Field name choice, length, style, consistency, etc.<\/li>\n<li>Use of root attribute<\/li>\n<li>Objects vs. Arrays<\/li>\n<li>Array element complexity<\/li>\n<li>Timestamp format<\/li>\n<li>Valued, Missing, Empty, and Null attribute values<\/li>\n<\/ul>\n<\/li>\n\n<\/ul>\n\n\n\n<h3 id=\"h-document-collections\" class=\"wp-block-heading\">Document Collections<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In Couchbase, different types of documents should be stored in separate collections. For example, users, orders, and products should each have their own collection within a scope.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Each document key only needs to be unique within its collection. You do not need to include prefixes or type indicators in the key. For instance, a document in the users collection might simply use the key &#8220;123&#8221;:<\/p>\n\n\n\n<pre class=\"wp-block-code language-json\"><code>key: &quot;123&quot;\n{\n  &quot;firstName&quot;: &quot;Leslie&quot;,\n  &quot;lastName&quot;: &quot;Knope&quot;\n}\n<\/code><\/pre>\n\n\n\n<h3 id=\"h-document-management-fields\" class=\"wp-block-heading\">Document Management Fields<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">It may be helpful for documents to contain a version property and other document management fields.  Depending on your application requirements, use case, the line of business, etc. other common properties to consider at:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>_created<\/code>\u00a0&#8211; A timestamp of when the document was created in epoch time (milliseconds or seconds if millisecond precision is not required)<\/li>\n\n\n<li><code>_createdBy<\/code> &#8211; A user ID\/name of the person or application that created the document<\/li>\n\n\n<li><code>_modified<\/code>\u00a0&#8211; A timestamp of when the document was last modified in epoch time (milliseconds or seconds if millisecond precision is not required)<\/li>\n\n\n<li><code>_modifiedBy<\/code> &#8211; A user ID\/name of the person or application that modified the document<\/li>\n\n\n<li><code>_accessed<\/code>\u00a0&#8211; A timestamp of when the document was last accessed in epoch time (milliseconds or seconds if millisecond precision is not required)<\/li>\n\n\n<li><code>_geo<\/code> &#8211; A 2 character ISO code of a country<\/li>\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The use of a leading <code>_<\/code> creates a standardized approach to global attributes across all documents within the enterprise.<\/p>\n\n\n\n<pre class=\"wp-block-code language-json\"><code>{\n  &quot;_schema&quot;: &quot;1.2&quot;,\n  &quot;_created&quot;: 1544734688923\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The same can be applied through a top-level property i.e. <code>\"meta\": {}<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code language-json\"><code>{\n  &quot;meta&quot;: {\n    &quot;schema&quot;: &quot;1.2&quot;,\n    &quot;created&quot;: 1544734688923\n  },\n  &quot;shoeSize&quot;: 13\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Choose an approach that works within your organization and be consistent throughout your applications.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Note<\/strong>: There is not a right or wrong property name. However, if your application will be using Couchbase Mobile (in particular Sync-Gateway \/ Capella App Services), the use of a leading underscore should be avoided, as any document that contains <a href=\"https:\/\/docs.couchbase.com\/sync-gateway\/current\/data-modeling.html\">root level properties of reserved property names<\/a> will be rejected. This is not a bug, and it meant to support backward compatibility with v1.0 of the replication protocol.<\/p>\n<\/blockquote>\n\n\n\n<h3 id=\"h-field-name-length-style-consistency\" class=\"wp-block-heading\">Field name length, style, consistency<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Brevity is beautiful at scale (e.g., 11 vs 6 characters * 1B documents) <code>geoCode vs countryCode<\/code><\/li>\n\n\n<li>Self-documenting names reduce doc effort\/maintenance <code>userName vs usyslogintxt<\/code><\/li>\n\n\n<li>Consistent patterns reduce bugs (pick and stick to a standard) <code>firstName or first_name or firstname<\/code>, but pick one.<\/li>\n\n\n<li>Use plural names for array fields, and singular for others <code>\"phones\": [ ... ], \"address\": { ... }, \"genre\": \" ... \", \"scale\": 2.3<\/code>.<\/li>\n\n\n<li>Avoid words that are reserved in SQL++: <code>user, bucket, cluster, role, select, insert<\/code> etc., Please refer to <a href=\"https:\/\/docs.couchbase.com\/server\/current\/n1ql\/n1ql-language-reference\/reservedwords.html\">SQL++ Reserved Words<\/a> for more details on how to escape reserved words in SQL++.<\/li>\n\n\n<li>Use letters, numbers, or underscore: <code>first_name vs first-name<\/code>.<\/li>\n\n<\/ul>\n\n\n\n<h3 id=\"h-objects-vs--object-arrays\" class=\"wp-block-heading\">Objects vs. Object Arrays<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">There are two different ways to represent objects.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Objects<\/strong> &#8211; In this choice, <code>phones<\/code> is an object in the <code>userProfile<\/code> class.<\/li>\n\n<\/ul>\n\n\n\n<pre class=\"wp-block-code language-json\"><code>{\n  &quot;created&quot;: &quot;2015-01-28T13:50:56&quot;,\n  &quot;dateOfBirth&quot;: &quot;1986-06-09&quot;,\n  &quot;email&quot;: &quot;andy.bowman@games.com&quot;,\n  &quot;firstName&quot;: &quot;Andy&quot;,\n  &quot;gender&quot;: &quot;male&quot;,\n  &quot;lastName&quot;: &quot;Bowman&quot;,\n  &quot;phones&quot;: {\n    &quot;number&quot;: &quot;212-771-1834&quot;,\n    &quot;type&quot;: &quot;cell&quot;\n  },\n  &quot;pwd&quot;: &quot;636f6c6f7261646f&quot;,\n  &quot;status&quot;: &quot;active&quot;,\n  &quot;title&quot;: &quot;Mr&quot;,\n  &quot;updated&quot;: &quot;2015-08-25T10:29:16&quot;,\n  &quot;username&quot;: &quot;copilotmarks61569&quot;\n}\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Object Arrays<\/strong> &#8211; In this choice, <code>phones<\/code> is an array of objects in the <code>userProfile<\/code> class.<\/li>\n\n<\/ul>\n\n\n\n<pre class=\"wp-block-code language-json\"><code>{\n  &quot;created&quot;: &quot;2015-01-28T13:50:56&quot;,\n  &quot;dateOfBirth&quot;: &quot;1986-06-09&quot;,\n  &quot;email&quot;: &quot;andy.bowman@games.com&quot;,\n  &quot;firstName&quot;: &quot;Andy&quot;,\n  &quot;gender&quot;: &quot;male&quot;,\n  &quot;lastName&quot;: &quot;Bowman&quot;,\n  &quot;phones&quot;: [\n    {\n      &quot;number&quot;: &quot;212-771-1834&quot;,\n      &quot;type&quot;: &quot;cell&quot;\n    }\n  ],\n  &quot;pwd&quot;: &quot;636f6c6f7261646f&quot;,\n  &quot;status&quot;: &quot;active&quot;,\n  &quot;title&quot;: &quot;Mr&quot;,\n  &quot;updated&quot;: &quot;2015-08-25T10:29:16&quot;,\n  &quot;username&quot;: &quot;copilotmarks61569&quot;\n}\n<\/code><\/pre>\n\n\n\n<h3 id=\"h-array-element-complexity-and-use\" class=\"wp-block-heading\">Array element complexity and use<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Array values may be <em>simple<\/em> or <em>object<\/em>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Store key to lookup\/join\n<ul>\n<li>In this choice, <em>tracks<\/em> is an array of strings which contain track IDs. Let&#8217;s say we have to get the <em>track<\/em> and <em>artist<\/em> name for each of the track id, in which case we will end up doing multiple <em>gets<\/em>. So, this choice will have a significant impact when the user base is high, say we have 1M users accessing this information which translates to 3M <em>gets<\/em> for this playlist.<\/li>\n<\/ul>\n<\/li>\n\n<\/ul>\n\n\n\n<pre class=\"wp-block-code language-json\"><code>{\n  &quot;created&quot;: &quot;2014-12-04T03:36:18&quot;,\n  &quot;id&quot;: &quot;003c6f65-641a-4c9a-8e5e-41c947086cae&quot;,\n  &quot;name&quot;: &quot;Eclectic Summer Mix&quot;,\n  &quot;owner&quot;: &quot;copilotmarks61569&quot;,\n  &quot;tracks&quot;: [\n    &quot;9FFAF88C1C3550245A19CE3BD91D3DC0BE616778&quot;,\n    &quot;3305311F4A0FAAFEABD001D324906748B18FB24A&quot;,\n    &quot;0EB4939F29669774A19B276E60F0E7B47E7EAF58&quot;\n  ],\n  &quot;updated&quot;: &quot;2015-09-11T10:39:40&quot;\n}\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Another approach is to nest a summary (copy some of the attributes from other documents) to avoid a lookup\/join\n<ul>\n<li>There are lot of advantages in this approach over the first one. In this choice, only <em>one<\/em> get is required to retrieve all the information that we need regarding the playlist.<\/li>\n<li>However, if this copied data is changed often, it might not be worth duplicating data<\/li>\n<\/ul>\n<\/li>\n\n<\/ul>\n\n\n\n<pre class=\"wp-block-code language-json\"><code>{\n  &quot;created&quot;: &quot;2014-12-04T03:36:18&quot;,\n  &quot;id&quot;: &quot;003c6f65-641a-4c9a-8e5e-41c947086cae&quot;,\n  &quot;name&quot;: &quot;Eclectic Summer Mix&quot;,\n  &quot;owner&quot;: &quot;copilotmarks61569&quot;,\n  &quot;type&quot;: &quot;playlist&quot;,\n  &quot;tracks&quot;: [\n    {\n      &quot;id&quot;: &quot;9FFAF88C1C3550245A19CE3BD91D3DC0BE616778&quot;,\n      &quot;title&quot;: &quot;Buddha Nature&quot;,\n      &quot;artist&quot;: &quot;Deuter&quot;,\n      &quot;genre&quot;: &quot;Experimental Electronic&quot;\n    },\n    {\n      &quot;id&quot;: &quot;3305311F4A0FAAFEABD001D324906748B18FB24A&quot;,\n      &quot;title&quot;: &quot;Bluebird Canyon Stomp&quot;,\n      &quot;artist&quot;: &quot;Beaver &amp; Krause&quot;,\n      &quot;genre&quot;: &quot;Experimental Electronic&quot;\n    }\n  ],\n  &quot;updated&quot;: &quot;2015-09-11T10:39:40&quot;\n}\n<\/code><\/pre>\n\n\n\n<h3 id=\"h-timestamp-format\" class=\"wp-block-heading\">Timestamp Format<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Working with Timestamp format is the difficult thing when it comes to JSON, since JSON does not have a standardized date format. Dates are commonly stored as string in JSON.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following are examples of commonly used date formats.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>ISO8601<\/strong><\/li>\n\n<\/ul>\n\n\n\n<pre class=\"wp-block-code language-json\"><code>{\n  &quot;countryCode&quot;: &quot;US&quot;,\n  &quot;gdp&quot;: 53548,\n  &quot;name&quot;: &quot;United States of America&quot;,\n  &quot;region&quot;: &quot;Americas&quot;,\n  &quot;region-number&quot;: 21,\n  &quot;sub-region&quot;: &quot;Northern America&quot;,\n  &quot;updated&quot;: &quot;2010-07-15T15:34:27&quot;\n}\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Time Component Array<\/strong> &#8211; This format can be extremely useful when you trying to group data. Lets say, you want to generate time series graph and this choice best suits when you want to visualize data.<\/li>\n\n<\/ul>\n\n\n\n<pre class=\"wp-block-code language-json\"><code>{\n  &quot;countryCode&quot;: &quot;US&quot;,\n  &quot;gdp&quot;: 53548,\n  &quot;name&quot;: &quot;United States of America&quot;,\n  &quot;region&quot;: &quot;Americas&quot;,\n  &quot;region-number&quot;: 21,\n  &quot;sub-region&quot;: &quot;Northern America&quot;,\n  &quot;updated&quot;: [ 2010, 7, 15, 15, 34, 27 ]\n}\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Epoch \/ Unix<\/strong> &#8211; Epoch format is a numeric value specifying the number of seconds that have elapsed since 00:00:00 Thursday, 1 January 1970. Epoch format is the most efficient in terms of brevity, especially if you reduce the granularity. This is the preferred format when you have to do some kind of date comparison, sorting etc.<\/li>\n\n<\/ul>\n\n\n\n<pre class=\"wp-block-code language-json\"><code>{\n  &quot;countryCode&quot;: &quot;US&quot;,\n  &quot;gdp&quot;: 53548,\n  &quot;name&quot;: &quot;United States of America&quot;,\n  &quot;region&quot;: &quot;Americas&quot;,\n  &quot;region-number&quot;: 21,\n  &quot;sub-region&quot;: &quot;Northern America&quot;,\n  &quot;updated&quot;: 1279208067000\n}\n<\/code><\/pre>\n\n\n\n<h3 id=\"h-four-states-of-data-presence-in-json-docs\" class=\"wp-block-heading\">Four states of data presence in JSON docs<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">It is important to understand that JSON supports optional properties. If a property has a null value, consider dropping it from the JSON unless there&#8217;s a good reason not to. N1QL makes it easy to test for missing or null property values. Be sure your application code handles the case where a property value is missing.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\n<p>Fields may have a value<\/p>\n<pre><code class=\"language-sql\">SELECT geocode WHERE geocode IS VALUED\n<\/code><\/pre>\n<pre><code class=\"language-json\">{\n  \"geocode\": \"USA\"\n}\n<\/code><\/pre>\n<\/li>\n\n\n<li>\n<p>Fields may have no value<\/p>\n<pre><code class=\"language-sql\">SELECT geocode WHERE geocode IS NOT VALUED\n<\/code><\/pre>\n<pre><code class=\"language-json\">{\n  \"geocode\": \"\"\n}\n<\/code><\/pre>\n<\/li>\n\n\n<li>\n<p>Fields may be missing<\/p>\n<pre><code class=\"language-sql\">SELECT geocode WHERE geocode IS [NOT] MISSING\n<\/code><\/pre>\n<pre><code class=\"language-json\">{\n}\n<\/code><\/pre>\n<\/li>\n\n\n<li>\n<p>Fields may be explicitly null<\/p>\n<pre><code class=\"language-sql\">SELECT geocode WHERE geocode IS [NOT] NULL\n<\/code><\/pre>\n<pre><code class=\"language-json\">{\n  \"geocode\": null\n}\n<\/code><\/pre>\n<\/li>\n\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Couchbase neither enforces nor validates for any particular document structure. Below are the design choices that impact JSON document design. Document Collections In Couchbase, different types of documents should be stored in separate collections. For example, users, orders, and products should each have their own collection within a scope. Each document key only needs to [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"menu_order":0,"template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"_acf":"","footnotes":""},"tutorial-languages":[551],"tutorial-tags":[565],"tutorial-technologies":[562,548,554],"tutorial-types":[555],"class_list":["post-10224","tutorials","type-tutorials","status-publish","hentry","tutorial-languages-any","tutorial-tags-data-modeling","tutorial-technologies-capella","tutorial-technologies-kv","tutorial-technologies-server","tutorial-types-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.8 (Yoast SEO v28.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>JSON Design Choices - Couchbase<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/it\/developers\/tutorials\/json-design-choices\/\" \/>\n<meta property=\"og:locale\" content=\"it_IT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JSON Design Choices\" \/>\n<meta property=\"og:description\" content=\"Couchbase neither enforces nor validates for any particular document structure. Below are the design choices that impact JSON document design. Document Collections In Couchbase, different types of documents should be stored in separate collections. For example, users, orders, and products should each have their own collection within a scope. Each document key only needs to [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/it\/developers\/tutorials\/json-design-choices\/\" \/>\n<meta property=\"og:site_name\" content=\"Couchbase\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Couchbase\/\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/2026\/10\/Cloud-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2548\" \/>\n\t<meta property=\"og:image:height\" content=\"1171\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@couchbase\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"7 minuti\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/it\\\/developers\\\/tutorials\\\/json-design-choices\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/it\\\/developers\\\/tutorials\\\/json-design-choices\\\/\",\"name\":\"JSON Design Choices - Couchbase\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/it\\\/#website\"},\"datePublished\":\"2025-08-04T15:56:24+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/it\\\/developers\\\/tutorials\\\/json-design-choices\\\/#breadcrumb\"},\"inLanguage\":\"it-IT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/it\\\/developers\\\/tutorials\\\/json-design-choices\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/it\\\/developers\\\/tutorials\\\/json-design-choices\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JSON Design Choices\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/it\\\/#website\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/it\\\/\",\"name\":\"Couchbase\",\"description\":\"The Operational Data Platform for AI\u2122\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/it\\\/#organization\"},\"alternateName\":\"Couchbase, Inc.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.couchbase.com\\\/it\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"it-IT\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/it\\\/#organization\",\"name\":\"Couchbase\",\"alternateName\":\"Couchbase, Inc.\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/it\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/it\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/Couchbase_Logo_Couchbase_Token_Red-1.png\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/Couchbase_Logo_Couchbase_Token_Red-1.png\",\"width\":1129,\"height\":1129,\"caption\":\"Couchbase\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/it\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/Couchbase\\\/\",\"https:\\\/\\\/x.com\\\/couchbase\",\"https:\\\/\\\/www.youtube.com\\\/c\\\/CouchbaseServer\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/couchbase\\\/\",\"https:\\\/\\\/github.com\\\/couchbase\\\/\",\"https:\\\/\\\/en.wikipedia.org\\\/wiki\\\/Couchbase,_Inc.\"],\"description\":\"Couchbase is a database software company headquartered in San Jose, California, providing an operational data platform for AI used by hundreds of global enterprises.\",\"legalName\":\"Couchbase, Inc.\",\"foundingDate\":\"2011-01-01\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"JSON Design Choices - Couchbase","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/it\/developers\/tutorials\/json-design-choices\/","og_locale":"it_IT","og_type":"article","og_title":"JSON Design Choices","og_description":"Couchbase neither enforces nor validates for any particular document structure. Below are the design choices that impact JSON document design. Document Collections In Couchbase, different types of documents should be stored in separate collections. For example, users, orders, and products should each have their own collection within a scope. Each document key only needs to [&hellip;]","og_url":"https:\/\/www.couchbase.com\/it\/developers\/tutorials\/json-design-choices\/","og_site_name":"Couchbase","article_publisher":"https:\/\/www.facebook.com\/Couchbase\/","og_image":[{"width":2548,"height":1171,"url":"https:\/\/www.couchbase.com\/wp-content\/uploads\/2026\/10\/Cloud-2.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@couchbase","twitter_misc":{"Est. reading time":"7 minuti"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/it\/developers\/tutorials\/json-design-choices\/","url":"https:\/\/www.couchbase.com\/it\/developers\/tutorials\/json-design-choices\/","name":"JSON Design Choices - Couchbase","isPartOf":{"@id":"https:\/\/www.couchbase.com\/it\/#website"},"datePublished":"2025-08-04T15:56:24+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/it\/developers\/tutorials\/json-design-choices\/#breadcrumb"},"inLanguage":"it-IT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/it\/developers\/tutorials\/json-design-choices\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/it\/developers\/tutorials\/json-design-choices\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/"},{"@type":"ListItem","position":2,"name":"JSON Design Choices"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/it\/#website","url":"https:\/\/www.couchbase.com\/it\/","name":"Couchbase","description":"The Operational Data Platform for AI\u2122","publisher":{"@id":"https:\/\/www.couchbase.com\/it\/#organization"},"alternateName":"Couchbase, Inc.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/it\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"it-IT"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/it\/#organization","name":"Couchbase","alternateName":"Couchbase, Inc.","url":"https:\/\/www.couchbase.com\/it\/","logo":{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/www.couchbase.com\/it\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/wp-content\/uploads\/2026\/11\/Couchbase_Logo_Couchbase_Token_Red-1.png","contentUrl":"https:\/\/www.couchbase.com\/wp-content\/uploads\/2026\/11\/Couchbase_Logo_Couchbase_Token_Red-1.png","width":1129,"height":1129,"caption":"Couchbase"},"image":{"@id":"https:\/\/www.couchbase.com\/it\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Couchbase\/","https:\/\/x.com\/couchbase","https:\/\/www.youtube.com\/c\/CouchbaseServer","https:\/\/www.linkedin.com\/company\/couchbase\/","https:\/\/github.com\/couchbase\/","https:\/\/en.wikipedia.org\/wiki\/Couchbase,_Inc."],"description":"Couchbase \u00e8 una societ\u00e0 di software per database con sede a San Jose, in California, che fornisce una piattaforma operativa per i dati utilizzata da centinaia di aziende globali.","legalName":"Couchbase, Inc.","foundingDate":"2011-01-01"}]}},"acf":[],"permalink_manager":null,"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/it\/wp-json\/wp\/v2\/tutorials\/10224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/it\/wp-json\/wp\/v2\/tutorials"}],"about":[{"href":"https:\/\/www.couchbase.com\/it\/wp-json\/wp\/v2\/types\/tutorials"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/it\/wp-json\/wp\/v2\/tutorials\/10224\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/it\/wp-json\/wp\/v2\/media?parent=10224"}],"wp:term":[{"taxonomy":"tutorial-languages","embeddable":true,"href":"https:\/\/www.couchbase.com\/it\/wp-json\/wp\/v2\/tutorial-languages?post=10224"},{"taxonomy":"tutorial-tags","embeddable":true,"href":"https:\/\/www.couchbase.com\/it\/wp-json\/wp\/v2\/tutorial-tags?post=10224"},{"taxonomy":"tutorial-technologies","embeddable":true,"href":"https:\/\/www.couchbase.com\/it\/wp-json\/wp\/v2\/tutorial-technologies?post=10224"},{"taxonomy":"tutorial-types","embeddable":true,"href":"https:\/\/www.couchbase.com\/it\/wp-json\/wp\/v2\/tutorial-types?post=10224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}