Hi Raja, On first glance this sounds somewhat reasonable. The format you've proposed can be very effective. Your proposal seems to be in line with the envelope pattern<http://developer.marklogic.com/learn/data-modeling>, though I'm not sure why not all properties would be put in the doc. If you move all the metadata over then you can remove the additional fragments in the system created for the properties docs, which can be useful.
150 properties may or may not be a lot, depending on the amount of content in those properties. But the model will be informed by the content profile (shape/size of data) and application profile (how is data used; queries, updates, etc.) Have you tested your proposal? Without knowing anything about your applications or content, some questions I would have are: * What's the average size of a doc after merging the content and metadata? o Will more metadata or content be added over time to existing docs? o If so, how large will the docs grow too? * How is this data used? o What types of queries? * How often is document content updated? * How often is metadata updated? * Are there any requirements to track changes to metadata or content? o If so, what does that look like? Additional properties? Do you need to store the previous version? * Do any of your searches/queries require the metadata and content to be in the same document? o If not, Can the metadata and content be stored in separate documents? Depending on answers to the above, you may want to store the metadata in a separate, but related document. The doc could be related either by adding another attribute to both the source document and metadata (either an element within the doc, or using a collection), or by using Semantic triples. Collections or triples may make more sense if you have multiple metadata docs per source doc, and/or if you're relating other documents as well as metadata to the source document. But if after moving the metadata over, the docs are of reasonable size and the content and metadata is rarely updated, and these docs are not related to anything else, then I'd say give it a go and test it. :) Hope this helps, Pete From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Thursday, February 11, 2016 2:35 AM To: [email protected] Subject: [MarkLogic Dev General] FW: Base content schema change Hi Team, Any suggestion really a helpful for us. By Raja >>> From: Marimuthu, Rajamani (Cognizant) Sent: Tuesday, February 09, 2016 3:27 PM To: [email protected]<mailto:[email protected]> Subject: Base content schema change Hi Team, We have one unique base document schema change plan. I will explain the existing scenario and an expected scenario . Kindly give some feedback about the changes . 1. We have document content in one xml file and all properties [meta data] in contents properties[~100 to 150 elements]. 2. We have plan to merge into single XML file [content and relevant properties] and default properties only will present in content properties [like last-modified]. 3. So we have the plan to maintain following XML structure post merge of the content as well as properties <Samples> <content></content> <properties></properties> </Samples> The above one is sample structure , the actual content element names will vary with correct meaning 4. How effective the above structure . Kindly need your feedback to go further in this change . Thanks and regards Raja >>> This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
