Physkey Details

Inside the database you may notice some fields called Physkey or PhyskeyX which contain random looking strings of letters and numbers. These are providing a distributed temporal file key, much like a primary key but unique across all systems and time. This means a physkey will never be regenerated even from nodes that aren't connected to the network when they need to create a key value.

  • Most users should simply ignore these fields as they do not contain anything useful.

  • Never edit a physkey field or copy values from one row to another, they contain important information for maintaining distributed database integrity. Equally never enter random characters into this field.

  • While physkey values appear random, they have a definite structure and are more index friendly than random keys, such as GUID

  • If you are a developer and need to create a physkey there are definite rules to create them. This information is not publically disclosed. You can generate GUID values if you must, however these must be prefixed correctly so the system knows they are random values. Do not simply store GUID values into physkey fields.

  • Physkey values are actually binary values not the ascii seen in the database. The system stores all keys in databases as ascii as this is much easier to deal with

  • Internally, Fieldpine systems are being migrated to use physkey values rather than single digit primary keys as these are hard to generate in large distributed environments. However, most tables will contine to have single digit primary keys allocated as they can be more optimal for relational databases.

  • While physkey (but not physkeyX) fields are generally unique across a relational output table, this is not always true. Where a table is storing child rows in a parent/child relationship the child rows may all have the same physkey. This is not common however.

  • You can freely add physkey field to the sales table. Other tables can support physkey but there may be version restrictions to observe.

  • Physkey values are used exclusively for eCommerce and mobile integration.

THIS ARTICLE APPLIES TO

  • All Fieldpine Products. As at Feb 2014