Skip navigation links

MySQL Forums :: Foreign Keys (Referential Integrity) :: 2 Columns as PK, Refering by FK to one of them and over another table to the other...


Advanced Search

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

Options: ReplyQuote


Subject Views Written By Posted
2 Columns as PK, Refering by FK to one of them and over another table to the other... 3641 Daniel Jäger 01/05/2011 08:44AM
Re: 2 Columns as PK, Refering by FK to one of them and over another table to the other... 1079 Chad Bourque 01/05/2011 10:23AM
Re: 2 Columns as PK, Refering by FK to one of them and over another table to the other... 1103 Daniel Jäger 01/05/2011 03:48PM
Re: 2 Columns as PK, Refering by FK to one of them and over another table to the other... 1704 Chad Bourque 01/05/2011 06:43PM
Re: 2 Columns as PK, Refering by FK to one of them and over another table to the other... 1142 Daniel Jäger 01/06/2011 08:30AM
Re: 2 Columns as PK, Refering by FK to one of them and over another table to the other... 1032 Chad Bourque 01/06/2011 11:05AM
Re: 2 Columns as PK, Refering by FK to one of them and over another table to the other... 1073 Daniel Jäger 01/10/2011 04:19AM
Re: 2 Columns as PK, Refering by FK to one of them and over another table to the other... 1093 Chad Bourque 01/10/2011 08:06AM
Re: 2 Columns as PK, Refering by FK to one of them and over another table to the other... 1349 Daniel Jäger 01/11/2011 08:02AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.