If we have an existing table with multiple fields. (TableX)
Now there was a task to create a table (TableY) with one string field only (Field1)
First question: should we change the primary index on TableY to be this field1 or leave it surrogate key and why?
Then the task said, add that Field1 to TableX as relation.
Way1:
Add field1 to TableX as a string, then add relation on TableX (TableX.Field1 = TableY.Field1)
Way2:
Add Field1 to TableX as recId ( of course we will set replacementKey on TableY to be Field1 index)
then add relation on TableX (TableX.Field1RecId = TableY.RecId)
And on the form for TableX, we'll add it as a reference group
Third question: which way is better for this scenario? and why?
Forth question: In general when should we put relation based on the string field and when we should put it based on RecId? and why?

Report
All responses (
Answers (