Forum Discussion
brunozanoelo
Post Patron
9 years agoCompound key
Why i cant use Compound Key in the binding of the tables? Case: Company 1 Seller 5 Company 1 Seller 6 Company 2 Seller 5 Should o use one column like "First Pk"_"Second Pk"? 1_5 1_6 2_5...
- 9 years ago
Hi brunozanoelo ,
Compound keys are less essential in an Analytics/Reporting environment, but yes if you concatenate the values you can create relationships between tables.
Phil_Seamark
Microsoft Employee
9 years agoHi brunozanoelo ,
Compound keys are less essential in an Analytics/Reporting environment, but yes if you concatenate the values you can create relationships between tables.
MaxW
Advocate II
8 years agoPlease be careful concatenating values to create compound keys, ideally convert id's to text and use a separator between them. This is a potential performance hit (text lookups are much slower than integer), but it is often necessary to avoid duplicate keys.
Consider:
Company 1 employee 12 key=112
Company 11 employee 2 key=112