Re: 2 Columns as PK, Refering by FK to one of them and over another table to the other...
Posted by:
Daniel Jäger ()
Date: January 05, 2011 03:48PM
Hi Chad,
first of all thanks a lot for taking your time looking through this and the hint with the decimal type (just had double and float on my mind there :\).
VAT stands for the value add tax. So there are multiple kinds of value add taxes possible per country (standard charges and reduced ones for selected goods).
The purpose behind the model is, that a organiser can select one of these VATs of his company's country
(SELECT vat FROM vat INNER JOIN organiser ON (organiser.country = vat.country) )
to be used for invoices he creates on an event. For example to bill sold tickets.
So in short, what you've read out of the model is what it should represent.
Do you think in this case the current model is in its circular way correct?
A question which comes up is: How I can find the other VATs of a country if the event has already set its VAT?
For instance, if my event has a VAT of 19% and three countries have this VAT too, then I still need to match the organisers country (with inner joins using event.organiser and organiser.organiser_id plus organiser.country and vat.country) against these three countries, do I?
thanks
Daniel