I need to create a dictionary of phrases. Each phrase must be unique in the dictionary: That is, it looks like an index to the table. The phrase will have many-to-many relations with other classes in my whole site, and may be a real source of inefficiency unless speedy look up to insure uniqueness, etc. (oh, yes, there will be potentially many, many thousands of these phrases)
At present I see no way to tell sapphire to create a second index, nor do I see an easy way to insert into an existing table and insure uniqueness.
I fear that I have looked in all the wrong places and am missing something pretty fundamental. Is there an 'industry standard' method of generating secondary keys? And insuring unique entries in a DB?
After drilling down into Sapphire, I found some hints on this subject. Evidently secondary indexes are already in sapphire, bug no examples seem to exist. This snippet will force that one and only one item of 'Tag' exists for each Tagname.
Also the syntax for secondary keys is, well, not obvious.
$indexes = array('Bob' => 'unique (Joe)'); -- gets mangled to 'UNIQUE BOB (JOE)'