Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Why is Key Attribute mandatory in Attribute View?

$
0
0

I am curious about the behavior of key attributes in attribute views.

 

First I thought it is kind of primary key for the entity Attribute View but then I did a few checks

 

Created two tables

1. CUST -Customer Table- It has Customer ID and Country ID

2. CTRY -Country Table- It has Country ID and Country Description

 

An Attribute View on top of these two tables

 

KeyAttributes1.JPG

Simple, nothing complex

 

Now in Semantics

KeyAttributes2.JPG

I am able to activate the attribute view and see the output

KeyAttributes3.JPG

but what I do next is interesting..I made the CID as a Key Attribute, though it is not a key in the data ('in' for two rows)

But I am still able to activate the Attribute View and see the data as well. I would like everyone to try this out.

KeyAttributes4.JPG

So what I don't understand is if this is allowed why is Key Attribute Mandatory?

I mean why should there be a key attribute if it does not check for Unique Constraint.


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>