Too costly for simplistic needs?
Permalink
I have no real security issues (money, personal info) in trying to link one table row information to that of another table row. Is there a more (recommended and) simplistic method for generating a unique ID for this purpose, or would you suggest using this helper even in a simple scenario?
For what purpose? Which helper? Which tables? What scenario?
(Thanks for the admonishment.) (:
I have some custom AttributeTypes that I was wanting to link together via a common key. I notice the primary keys of AttributeType tables do not auto-increment. The tables for Attribute Categories (*AttributeValues and *AttributeKeys) also do not auto-increment their primary key. But the AttributeValues and AttributeKeys tables do.
In linking two AttributeType tables I was concerned about losing their relationship through auto-incrementing of the primary key(s). My original post here was in contemplating the use of the helper for generating UniqueIDs. That seems wrong now.
The logic appears to be to assign the AttributeKeys (auto-incrementing) ID when the AttributeType is bound to an AttributeCategory. The AttributeValues table avID (auto-incrementing key) is assigned for every new value (row) of that AttributeType created against an AttributeCategory (using the same akID of the AttributeKeys table). The AttributeValue (avID) used within the AttributeType's table (as the primary key) is consistent (non incrementing) within that table and therefore usable as a reference number within another AttributeType table - in order to logically link two active records together within those two tables.
Thanks for the quick replay, Jordan. Maybe that description might help someone else (unless I get a correction from you).
I have some custom AttributeTypes that I was wanting to link together via a common key. I notice the primary keys of AttributeType tables do not auto-increment. The tables for Attribute Categories (*AttributeValues and *AttributeKeys) also do not auto-increment their primary key. But the AttributeValues and AttributeKeys tables do.
In linking two AttributeType tables I was concerned about losing their relationship through auto-incrementing of the primary key(s). My original post here was in contemplating the use of the helper for generating UniqueIDs. That seems wrong now.
The logic appears to be to assign the AttributeKeys (auto-incrementing) ID when the AttributeType is bound to an AttributeCategory. The AttributeValues table avID (auto-incrementing key) is assigned for every new value (row) of that AttributeType created against an AttributeCategory (using the same akID of the AttributeKeys table). The AttributeValue (avID) used within the AttributeType's table (as the primary key) is consistent (non incrementing) within that table and therefore usable as a reference number within another AttributeType table - in order to logically link two active records together within those two tables.
Thanks for the quick replay, Jordan. Maybe that description might help someone else (unless I get a correction from you).