Requests for comment/Associated namespaces/Database schemas

Preliminary notes
See: User:Skizzerz/Namespaces

Semantics of page namespace grouping

 * A namespace can be defined as the lead namespace of a group of namespaces
 * A namespage can only lead one namespace group, or be associated with one namespace group (one-to-many relation)
 * A talk page namespace can be associated to just one content namespace or to several

New database schemas

 * New namespace table needed to hold namespace relational data, based on previous work by Skizzerz.
 * Cannot guarantee that a talk namespace number will directly follow the namespace it is tied to, so this change needs to be reflected in code.


 * Hold namespace names in a namespace_l10n table
 * For now just a wrapper for $wgExtraNamespaces and $wgNamespaceAliases (language all)
 * In the future might allow localized names for extra and built in namespaces


 * Index nl_namespace_name on nl_namespace and nl_name
 * Unique index nl_namespace_default on nl_namespace and nl_default


 * Each page namespace can only appear once as associated page namespace in the table. This constraint is necessary to avoid confusion when creating new content pages.
 * When a namespace appears more than once as leading namespace, it means that it forms a group with more than one associated page namespace

Modelling example
Namespace_group relations of a future wikipedia templates (lead-associated): There can be one talk page for all the group or one talk page for each member of the group, as defined on namespace.ns_talk_of
 * "template"->"template documentation"
 * "template"->"template data"