- Help Topics: 1. A Short Introduction to IGSDB V2 2. What's Changed
2.3. The "CGDB" ID
cgdb_id
property in the IGSDBv2
refers to the ShadeMaterial.ID
CGDB column if the product is a shade material, or the ShadingLayer.ID
CGDB column if the product is any other subtype of shading product.
Shading Product Unique Identifiers in the CGDB
In the traditional CGDB database schema, shade materials are stored in the
ShadeMaterial
table and uniquely identified by the ID
column.
However, these shade materials are also stored in the GlazingProperties
table,
as a way to link them to spectral measurement data stored in the SpectralData
table.
Therefore, for rows in the GlazingProperties
table that correspond to a shade material,
the NFRC_ID
column is used as an informal foreign key to link to
the GlazingProperties.ID
column.
Unfortunately, one must then remember that for rows in the GlazingProperties
table that
correspond to shade materials, the NFRC_ID
column isn't really an NFRC ID.
Storing CGDB Identifiers for Shade Materials in the IGSDBv2.
In the IGSDBv2, the user is encouraged to use the token
slug, uuid
UUID4 identifier,
or product_id
integer as a way of uniquely identifying any product, glazing or shading.
However, as explained elsewhere in these docs, the IGSDBv2 also stores identifiers for products
that were imported from the IGDB or CGDB...mainly for consistency and for software applications that need this
historical data.
Therefore, for shade material products imported from the CGDB, this legacy identifier (the
CGDB ShadeMaterial.ID
column) is stored in a Product's cgdb_id
property. This property
is shown in the IGSDBv2 user interface and the API.
Storing CGDB Identifiers for Shading Layers in the IGSDBv2.
As noted in the Types
and Subtypes help page, the IGSDBv2 attempts to reorganize shade materials and shading layers under a new
type/subtype system, where shade materials and the various shade layers are all categorized as
subtypes under a single SHADING
type...e.g. shade materials are type SHADING
and
subtype SHADE_MATERIAL
,
cellular blinds are type SHADING
and subtype CELLULAR_BLIND
, and so on.
So the IGSDB must also remember the legacy CGDB ID for shading layers, which are stored in a different table in
the CGDB: the ShadingLayer
table,
which has its own ID
column.
The IGDBv2 stores this ID in the same cgdb_id
property. This means that, depending on
the product subtype, the cgdb_id
property in the IGSDBv2 can refer to either a shade material or a
shading layer's ID from the CGDB.
Therefore, when looking at type SHADING
products in the IGSDBv2, the user should remember that a
Product's cgdb_id
property can refer to either a CGDB shade material ID or a CGDB shading layer's ID.
To recap:
- If a product is type
SHADING
and subtypeSHADE_MATERIAL
, thecgdb_id
property corresponds to the ID column of theShadeMaterial
table in the CGDB. - If a product is type
SHADING
and any other subtype, thecgdb_id
property corresponds to the ID column of theShadingLayer
table in the CGDB.