|
Archives of the TeradataForumMessage Posted: Tue, 05 Jul 2011 @ 16:20:14 GMT
John_Wight wrote:
But allowed in Standard SQL :-( And this is probably the reason why they have been added to TD, to be compatible to Standard SQL. At least you got a choice between set and multiset, e.g. Oracle and MS SQL Server table are always multiset, you have to add a unique constraint/index.
For me this is the main reason to use multiset tables. The other one is the staging area where you actually might get duplicates in your input data.
#1: Fred already mentioned the difference for INSERT/SELECTs, silently discarding vs. error. #2: The logical PK from the LDM might not be usefull for access/joins, so implementing it as a USI will add overhead without any reward. If you load large amounts of rows using SQL you *must* check for PK violations before/during the INSERT/UPDATE otherwise you'll get a rollback. Why doing the same check for uniqueness a 2nd time (USI)? It's similar for FKs, who actually implements FKs in a warehouse? Dieter
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||