Referential integrity checks on a Complex datatype
S
Sumit Chandra
started a topic
almost 3 years ago
Hi -
We are in process of finalizing data model for our domain.
We are using a complex datatype to store address . The definition attributes of this address complex datatype are:
Street
City
Region
Country
Postalcode
We have two lookup tables - Lkp_Region which has all the values of region and Lkp_Country which has all the values of country.
We need to establish a foreign key relationship between Lkp_Region and Region definition attribute of the complex datatype that we have created. We need to do the same between Country definition attribute of the complex datatype and Lkp_country.
Is this use case of applting foreign key constraints on fields of a complex datatype feasible ? and how we should go about implementing refrential integrity on columns of a complex datatype ?
Thanks for the response
Best Answer
F
Fathia Jama
said
almost 3 years ago
When creating a reference relationship, the relationship is on the entity not on a specific attribute. For example if you create a entity address with a complex data type, the relationship with region would create a reference to region from entity with its own attribute. FID_Region
When creating a reference relationship, the relationship is on the entity not on a specific attribute. For example if you create a entity address with a complex data type, the relationship with region would create a reference to region from entity with its own attribute. FID_Region
S
Sumit Chandra
said
almost 3 years ago
Hi Fathia -
Thanks for the response.
To clarify my question - In the example that you have provided, my ask is - can the Region FK that is created on Address table, be part of 'InputAddress' complex datatype ? rather than existing as a simple attribute of Address entity ?
Thanks
Thanks
F
Fathia Jama
said
almost 3 years ago
No, the reference attribute is created once the relationship is created. We cannot force the reference attribute to be apart of the complex type.
1 person likes this
S
Sumit Chandra
said
almost 3 years ago
Thanks. That answers my question.
We were lookign to create an address data type . But we need to enforce country & region values via a refrence relationship. Guess, we will create the address fields as simple attributes and work from there.
Sumit Chandra
Hi -
We are in process of finalizing data model for our domain.
We are using a complex datatype to store address . The definition attributes of this address complex datatype are:
Street
City
Region
Country
Postalcode
We have two lookup tables - Lkp_Region which has all the values of region and Lkp_Country which has all the values of country.
We need to establish a foreign key relationship between Lkp_Region and Region definition attribute of the complex datatype that we have created. We need to do the same between Country definition attribute of the complex datatype and Lkp_country.
Is this use case of applting foreign key constraints on fields of a complex datatype feasible ? and how we should go about implementing refrential integrity on columns of a complex datatype ?
Thanks for the response
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstFathia Jama
Sumit Chandra
Hi Fathia -
Thanks for the response.
To clarify my question - In the example that you have provided, my ask is - can the Region FK that is created on Address table, be part of 'InputAddress' complex datatype ? rather than existing as a simple attribute of Address entity ?
Thanks
Thanks
Fathia Jama
No, the reference attribute is created once the relationship is created. We cannot force the reference attribute to be apart of the complex type.
1 person likes this
Sumit Chandra
Thanks. That answers my question.
We were lookign to create an address data type . But we need to enforce country & region values via a refrence relationship. Guess, we will create the address fields as simple attributes and work from there.
Regards
-
LOV label in Named Query
-
How we can set Dynamically changing Form field Description?
-
Is it possible to have a conditional survivorship rule based on a SemQL filter (akin to the filter on privileges)?
-
Where Do I View 2 Merged Records?
-
Show/hide an attribute in a form
-
Restrict access of attributes
-
Is it possible to manage visible/invisible value in List depend on user role??
-
Why am I unable to merge duplicates?
-
How are child records selected when parent records are manually merged?
-
Can the response from the API Call Response can be formatted differently in the JSON output?
See all 178 topics