Hi, all here,
As we are allowed to select one table as both case table and nested table, however what is the benefit of using one table as both case table and nested table? Thanks in advance for your advices.
I am looking forward to hearing from you shortly.
With best regards,
Yours sincerely,
Selecting the same table as both case and nested table makes sense when the table actually has two keys and represents a one-to-many relationship. An example is a transaction table, which contains products purchased by each customer. It could look like below:CustID ProductID
1 Beer
1 Milk
1 Coke
1 Chips
2 Oreo
2 Milk
...
As you see, there is a one-to-many relationship between CustID and ProductID.
Typical modeling with nested tables would require a separate table, with customer information (containing the distinct customers, their IDs and possibly other information) and a relationship from that table to this one, with CustID acting as a Foreign Key inside this transaction table.
However, when:
- no Customer table is present OR
- no additional useful information is available in the Customer table
it is helpful to use only the transaction table for mining.
Internally, the implementation issues two queries, one of them selecting all distinct customers.
Hope this clarifies the scenario and any benefits|||
Hi, Bogdan,
Thanks a lot for your very helpful advices.
With best regards,
Yours sincerely,
No comments:
Post a Comment