## 6 Implementation and Application of the PORTAL-DOORS System
### Implementation of Current Version 0.6
Data types for the optional keys have been chosen to facilitate conventions as well as meaningful intended uses. For example, **ResourcelidKey** as an integer is used to maintain all master-detail table relations for a single resource (see in Figure 5 all foreign keys linking into the right side of the field **ResourcelidKey** in the table **NResources**), while **InfosetGuidKey** as a guid (the T-SQL uniqueidentifier datatype) is used to maintain all references from one resource to another distinct resource within the self-referencing self-describing scheme of the relational data model (see in Figure 5 all foreign keys linking into the left side of the field **InfosetGuidKey** in the table **NResource**). As another example, short-length character string handles for a record are more appropriate for agents (if persons, not webbots) editing the record at a single site, whereas medium-length guides for an infoset are more appropriate for servers communicating and exchanging records between multiple PDS sites.For internal PDS processing (interpreted as either within a single PDS server or within the PDS network between PDS servers), medium-length guides can also be more convenient than potentially very long-length labels assuming that the guides and labels are maintained in a strict one-to-one mapping correspondence for the same resource. Using more than one identifier (_i.e._, in addition to the required resource label), such as the example pair of both a record handle and a resource label, also enables the agent to maintain the information for the resource entity -- even changing the label -- without being required to delete the record and create a new record. The new facility that enables the use of alias labels together with the canonical label for a resource entity provides another mechanism to achieve a similar task while also enabling use of multiple different identifiers appropriate in different contexts or at different times. In this case, both a newer alias and an older alias can be maintained in addition to the canonical label if desired. Alternatively, an alias label can be re-declared to be the current canonical label. For the resource entity metadata within the main table **NResource**, there are three directly self-referencing relations from fields with the suffix _**GuidedRef** to three other resources for the **EntityOwner**, **EntityContact**, and **EntityOther**. Any resource may be registered with references **EntityOwner** and **EntityContact** to other resources for the entity owner and contact, but only metaresources of the special type meta-entity may be registered with a reference **EntityOther** to the targeted primary resource (see Section 5.3). In fact, the metaresource cannot be validated without this reference **EntityOther**. For the resource record metadata within the main table **NResource**, there are four directly self-referencing relations from fields with the suffix _**GuidedRef** to four other resources for the **EntityRegistrant**, **EntityRegistrar**, **EntityRegistry**, and **EntityDirectory**. There is no requirement that the necessary information for all of these seven other possible resources be stored at the same NEXUS server node. However, if so, then each can be referenced via the _**GuidedRef**, and if not, then it can be referenced via the analogous _**Label** fields (not shown in Figure 5). For example, the resource for the **EntityContact** can be referenced internally via the **EntityContactGuidRef** or externally via **EntityContactLabel**. Check constraints can be used to prevent both the _**GuidedRef** and the _**Label** for the **EntityContact** from being simultaneously non-null. Alternatively, appropriate programming logic can be used to maintain precedence of the internal reference via the _**GuidedRef** over the external reference via the _**Label**, or vice versa, depending on the non-null values of these fields in the context of the status of the boolean field **RecordIsCachedCopy**.