Skip to main content
Solved

How to calculate the CRC for a database schema


dollargis
Contributor
Forum|alt.badge.img+1

To compare database table structures, I try to calculate the CRC of the table schema like this.

However I seem to be unable to set the parameters for the crc calculator to do what I want. In the end I only need that one number of the CRC to compare it with the equally retrieved CRC of the same table in a different database

Best answer by david_r

The schema definition comes as a list attribute, which isn't really supported by the CRCCalculator. You can e.g. use a ListConcatenator to convert the list into a string for the CRCCalculator.

Note 1: If the schemas are identical but the attribute order differs, the CRC will also differ. You can use a ListSorter before the ListConcatenator to prevent this.

Note 2: If you haven't already, set the FeatureReader to read only the schema feature and not the data features, it will make a big difference in performance:

View original
Did this help you find an answer to your question?

2 replies

david_r
Evangelist
  • Best Answer
  • April 26, 2018

The schema definition comes as a list attribute, which isn't really supported by the CRCCalculator. You can e.g. use a ListConcatenator to convert the list into a string for the CRCCalculator.

Note 1: If the schemas are identical but the attribute order differs, the CRC will also differ. You can use a ListSorter before the ListConcatenator to prevent this.

Note 2: If you haven't already, set the FeatureReader to read only the schema feature and not the data features, it will make a big difference in performance:


dollargis
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • April 26, 2018

@david_r: yes, like that it works fine. Thanks!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings