How to study the layout of a database?

  • jcelko212 32090 - Tuesday, November 20, 2018 10:28 AM

    ben.brugman - Tuesday, November 20, 2018 5:26 AM

    jcelko212 32090 - Sunday, November 18, 2018 3:39 PM

    So anybody using a digital calculator for money and currencies is committing a crime?   😀:sick:

    Rounding might actually be worth writing an article. Good idea! I haven't looked at the current rules in a while, so that would make me do some research. Actually, I've seen someone get in trouble for using a pocket calculator.

    He rounded every item in a long list either up or down (I camber which direction), instead of varying it from item to item. Then he did his summation. The errors accumulated in one direction and messed up the final results. Suddenly, what had been done on the mainframe didn't match his calculations.

    ToEven is also known as 'Banking Rules', it the default used in IEEE 754 floating-point standards, which is why it's the default in .NET.

    Conversely, AwayFromZero is also known as 'Commercial Rounding'. I don't know why it is the default of SQL Server. It's very widely known and SQL has been used in commercial environments.

    Euro conversion gets even weirder. If you go from one non-euro currency to another, you have to convert the first currency to euros, then convert the euros to the second currency. It's called triangulation. The problem is that transactions occur so fast that the rates can change during the calculations - ARRGH :sick:!

    I'm going to assume by now everybody seen the problems with the old Sybase MONEY datatypes. Basically, if you do multiplication and division, it rounds too soon and only carries things out to four decimal places.

    I worked on a project to convert a system back when the Euro came in and iirc, not only did you have to triangulate via the Euro, it was also specified that you had to do so to at least 6 decimal places.

Viewing post 31 (of 31 total)

You must be logged in to reply to this topic. Login to reply