jcrespo added a comment. |
A strictly unique key (possible PK) in the table would be a combination of all 4 fields, Do you see this as being too much? Would the id vs string for site make a difference here?
Another option could be a PK on the site, namespace and title_key (but this could run into an edge case where a single site contains 2 different titles that get normalized to the same key.
Both are not really good.
I have no idea what you are doing (this is not a complain, I just do not understand it). First you sent a proposal, then you sent a complete different one doing LEFT JOINs and RIGHT JOINs. I have no idea what you are trying to model here. I would suggest asking someone who knows better what you are trying to do and gives you some help on how to modeling that, while following the 2 general rules I told you: simple SELECTs and normalized content.
Something that usually helps is https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model and writing realistic, large example data.
Once you have a final proposal, send a gerrit review and I will give it another look.
Cc: daniel, Tobi_WMDE_SW, hoo, Aklapper, jcrespo, Addshore, Marostegui, Minhnv-2809, D3r1ck01, Izno, Luke081515, Wikidata-bugs, aude, Darkdadaah, Mbch331, Jay8g, Krenair
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs