टेम्पलेट:Show data: रिवीजन सभ के बीचा में अंतर

Content deleted Content added
→‎Creating new data templates: ==Efficiency== In this template system each template contains various properties of a single entity, as opposed to the other common system, where a template contains
No edit summary
लाइन 112:
==Creating new data templates==
[[Template:Data/preload]] can be used to create new data templates. On the page of the data template of a province, if there is no data template yet for the country, a link appears to create that, preloading this template. Otherwise the wikitext can be copied to the new data template. For parameters which are not applicable, such as ''country'' for a country, the parameter definition "country=" can be deleted. For parameters to be filled in later the parameter definition like "popinc=" (specifying the empty string as value) can be left in the wikitext to be filled in later. Do not forget parameter 1.
 
{{refs}}
<includeonly>[[Category:Data templates|{{if||{{{country|}}}|{{{country}}} {{{1}}}|{{if|eq|{{{type}}}|continent| {{{1}}}|{{if|eq|{{{1}}}|world| |{{{1}}}}}}}}}]]</includeonly><noinclude>[[Category:Data retrieval templates]]</noinclude>
 
==Efficiency==
In this template system each template contains various properties of a single entity, as opposed to the other common system, where a template contains one property (e.g. population or area) of many entities. Although that other system can be convenient if updates of a property for all entities become available together, in the case of large-scale use of data on one page that other system can be problematic due to its inefficiency. This is because of the following:
 
Although it is convenient if data likely to be changed at the same time (because updates become available together) are in the same data template, in the case of large-scale use of data on one page that other system can be problematic due to its inefficiency. This is because of the following:
*There are often more entities than properties, and [[wp:template limits|page counts]] (or in the case of <code>#switch</code>, average page counts) are proportional to the number of data items in the data template (if they are stored in a linear way, not in a tree, and not stored as unnamed parameters).
*In the case of large-scale use of data on one page there are usually one or more tables, where an entity forms a row and a property a column, because there are often more entities than properties, and because this way the sorting feature allows sorting entities based on a property. In this template system this allows producing a row with only one call of the data template, making the count not grow faster than proportional to the average number of data items stored per data template, times the number of entities in the table.
 
{{refs}}
<includeonly>[[Category:Data templates|{{if||{{{country|}}}|{{{country}}} {{{1}}}|{{if|eq|{{{type}}}|continent| {{{1}}}|{{if|eq|{{{1}}}|world| |{{{1}}}}}}}}}]]</includeonly><noinclude>[[Category:Data retrieval templates]]</noinclude>
 
Until here the documentation is automatically generated by [[Template:Show data]].