We have a countries collection, where default language is English, containing the ISO 3166.
- Country document information can change over the time (ISO standards can change).
- Maybe adding "myinternalid" would be useful to be independent of external changes.
Country Document example:
{
_id: Object_id,
myinternalid: "someUniqueID",
name: "Bahrain",
alpha2: "BH",
alpha3: "BHR",
countrycode: "48",
iso31662: "ISO 3166-2:BH",
region: "Asia",
subregion: "Western Asia",
intermediateregion: "",
regioncode: "142",
subregioncode: "145",
intermediateregioncode: null,
FIELD12: null
}
We have a generic translations collection. We can optionally choose "myinternalid" or "Object_id" as refid.
Translation Document example:
{
_id: Object_id,
refid: ? Object_id OR myinternalid ?,
ref: "countries",
langid: "spa",
name: "Baréin",
region: "Asia",
subregion: "Asia occidental"
}
Questions:
- Is a valid or good strategy adding "myinternalid" for being independent to external ISO changes?
- Is there any problem in using "myinternalid" as a refid?
myinternalid
to theCountry
document when it has an_id
already?