I’m working on migration from MySQL to Grakn, but I have a “conceptual” doubt. I have modeled something like that:
language sub attribute, datatype string, has languageName; languageName sub attribute, datatype string; pos sub attribute, datatype string, has entry; uid sub attribute, datatype string; name sub attribute, datatype string; baseEntity sub entity, abstract, key uid; lexeme sub baseEntity, has name, has pos, has language;
In MySQL I have tables for Language and POS (just to store the code and the description), but in Grakn I’ve modeled as attributes with attributes, for example language=‘en’, languageName=‘English’ and so on.
I insert records for Lexeme entity with:
insert $lexeme isa lexeme; $lexeme has uid "cjvn84fiu0uribokvqb29w20y"; $lexeme has pos "N";$lexeme has language "en"; $lexeme has name "word";
My doubt is: there no “foreign key”, but Grakn “knows” that the attribute language (=‘en’) in Lexeme is the ‘same’ recorded before? this is, is there just one record for language=‘en’, internally? Or are the records duplicated? My concern is because Lexeme entity has 300,000 instances…
And: is necessary to create the uid attribute? Or Grakn has some kind of field for act as key?