In CDS database, Keys is an essential feature to ensure data cosistency/integrity via which you can ensure no duplicate values can occur in some datatypes inclusing text. This is not complete though, Keys needs to support more datatypes including Calculated Fields that comes from concatenating 2 fields (mostly text fields but could be combination) to deal with this senario, for example: -
I have 2 custom entities on the top of my database model, one is COUNTRY and the other is CITY. While I have entered all countries we work with, like 80 or so, cities are to be added by users. I could create a key in CITY that is the City Name but for this is not correct in real life, as for instance, I have 2 cities called Tripoli, one is in Libya and the other is in Lebanon. So the right thing is to create a key from the calculation of concatenation of City Name and Country in the CITY entity, something not available because also calculated fields are not possible available to key feature.