on 03-13-2017 12:45 PM
Could anyone please let me know if it is worthy to use foreign keys to maintain data integrity at the expense of performance in SAP HANA.
If you are asking this question, then the answer is likely: YES!
Do implement any measure that helps your data to be consistent.
Not using DB constraints puts the responsibility for ensuring data consistency to the application layer. That means you, the developer, has to write or use code that does these things.
Are you doing that? If so, what kind of consistency do you ensure? Avoiding duplicates? Avoiding false references through insert/update/deletes? Does your data model even allow for automatic consistency handling? Approaches like entity-value-store modelling decidedly don't allow for that.
Data consistency is never the question of performance. You don't want your wrong data to be processed faster. The results will still be wrong.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gowthami,
Foreign Keys are called Referential Constraints in SAP HANA. Maintaining Referential Constraints for a tables to check the data integrity depends on the requirement. if we are dealing with some transaction requirement and not focusing on just creating a datawarehouse, i would suggest to go for it.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.