AVPs can be associated to a user or a domain. So, when performing DB operations like load/store/delete, the AVPs can be identified as follows:
user's AVPs :
by username and domain (in multi-domain setups)
by username (in single domain setups)
by uuid (uuid based setups)
domain's AVPs: by domain name
The table format used by AVPOPS module in DB operations is:
unique user ID (uuid) - string and optional - an unique identifier of the user who owns the AVP
username - string and optional - username of the user who owns the AVP
domain - string and optional - domain of the user who owns the AVP or domain whom the AVP belongs to
attribute name (AVP name) - string and mandatory - name of AVP's attribute
attribute value (AVP value) - string and mandatory - value of AVP's attribute
AVP type - the AVP type consists in two binary flags (position 1 and 0): if the AVP name is ID and if the AVP value is integer:
0 - AVP with string name and string value
1 - AVP with string name and integer value
2 - AVP with integer name and string value
3 - AVP with integer name and integer value
Of a huge interest, is the posibility of accessing (loading) into AVPs more general data form all kind of sources (tables), sources which does not follow the standart AVPOPS database description. To do so, the AVPOPS module defines the DB schemes. Basically, a DB scheme describes who the AVPOPS should access and extract general data from a non-standart DB table - this description includes table name, column names, column to be used for extracting the value and pre-definition of value type.
In order to be used via DB schemes, the minimum requirement for a DB table is to contain at least an equivalent to UUID column or the equivalent to USERNAME and DOMAIN columns. This is required for making possible the AVP identification - by UUID or by USERNAME and DOMAIN.
A DB scheme contains:
column name to be used as UUID
column name to be used as DOMAIN
column name to be used as USERNAME
column name to be used as AVP VALUE
expected TYPE of the AVP value
table name to be used