educative.io

Question about data sample

Chemical formula Dosage (mg) Available Brands
Levothyroxine 25 { Levoxyl, Synthroid }
Levothyroxine 75 { Levoxyl, Unithroid}
Rosuvastatin 10 {Arvast, Crestor}
Levothyroxine 25 {Jupiros, Lipirose}
Esomeprazole 25 {NexIUM}

Here the table with data sample in the lesson. Table definition says that ChemicalFormula is PartitionKey and Dosage is RangeKey. In the example data there are two rows with the same PrimaryKey (Levothyroxine, 25). Is it a mistake or I don’t understand smth?

Hey @11110 !
Multiple items can have the same partition key value when a table has a partition key and a sort key. However, those items must have different sort key values.
In the given table, Levothyroxine, a partition key, is twice in the table but with a different sort key, so it is correct.
We hope Educative has inspired you to further your learning. Thank you.