Party Data Model
Last Edit: January 30, 2018 the alpha360 team
Every Party Entity has one and only one gParty record associated with it.
The gParty table has general information about a Party Entity, like the Name, the Industry, the VATID etc.
Some of this information can be found in string or number fields in the table and other information can be found in dimension tables, directly related to the gParty table.
There is also other information about the Party Entity, stored in other tables, that is not directly related to the gParty table - more on this in the Sales and Purchases functional areas.
There are 2 types of dimension tables directly related (or connected) to the gParty table:
1. The [1,1] -> [0,n] related dimension tables
A paradigm for this type of relation is the gParty -> gIndustry relation (see the image above)
Just note here that in most Relational Model "notations" the PKs and the FKs have the same name - here it would be gParty.sIndustryPK instead of gParty.sIndustryFK. This type of naming is also used, by default, in the WX IDE.
To distinguish between PKs and FKs, we use different names for the PK and FK fields.
2. The [0,n]-> [1,1] related dimension tables
A paradigm for this type of relation is the gParty -> gPartyAddress relation (see the image above)
In addition to the above tables there are also the sCustomer, pSupplier, gPerson and hEmployee tables, discussed in the Customer, Supplier, Person and Employee entities sections.
The Party Entity by itself cannot be used in the Sales functional area - it is not a Customer Entity.
This is done with a one to one relation between the gParty record and a sCustomer record - here the PK is the gPartyPK.sPartyPK field and the FK is the sCustomer.sPartyFK field.
To implement this type of relation in the Analysis:
All information needed for the Customer role is stored in the sCustomer table or tables related to the sCustomer table.
Note here that although the sCustomer.sPartyFK field, as implied by its name, is a FK (moved over from the gParty table), it is also the PK of the sCustomer table.
The above relation is all that is needed for a Party Entity to become a Customer Entity - in a purely Relational world.
But in the Party Data Model, there are a couple of things that are not 100% relational ...
We have added a boolean field named bCustomer in the gParty table - the bCustomer is set to true if a Party is a Customer and this is controlled by BPs.
Although there is a lot of Business Processing needed to implement this boolean field, we think it is worth it since it speeds things up, especially queries.
The most important relation is with the gPartyPosting table - this relation controls taxes and posting to GL
The Party Entity by itself cannot be used in the Purchase functional area - it is not a Supplier Entity.
This is done with a one to one relation between the gParty record and a pSupplier record - here the PK is the gPartyPK.sPartyPK field and the FK is the pSupplier.sPartyFK field.
To implement this type of relation in the Analysis:
All information needed for the Supplier role is stored in the pSupplier table or tables related to the pSupplier table.
Note here that although the pSupplier.sPartyFK field, as implied by its name, is a FK (moved over from the gParty table), it is also the PK of the pSupplier table.
The above relation is all that is needed for a Party Entity to become a Supplier Entity - in a purely Relational world.
But in the Party Data Model, there are a couple of things that are not 100% pure relational ...
We have added a boolean field named bSupplier in the gParty table- the bSupplier is set to true if a Party is a Supplier and this is controlled by BPs.
Although there is a lot of Business Processing needed to implement this boolean field, we think it is worth it since it speeds things up, especially queries.
The most important relation is with the gPartyPosting table - this controls taxes and posting to GL
The Party Entity is a Legal Entity by default.
This is done with a one to one relation between the gParty record and a gPerson record - here the PK is the gPartyPK.sPartyPK field and the FK is the gPerson.sPartyFK field.
To implement this type of relation in the Analysis:
All information needed for the Person role is stored in the gPerson table or tables related to the gPerson table.
Note here that although the gParty.sPartyFK field, as implied by its name, is a FK (moved over from the gParty table), it is also the PK of the gParty table.
This is used here for developers who want to extend the Data Models and implement HRM functionality.
Please note that it is NOT supported in the current version.
next -> the Parties Business Processes
Copyright 2017/18 - computerplus