Subject | RE: [firebird-support] Design Question: Storing and using generic text "tags" |
---|---|
Author | Jarrod Hollingworth |
Post date | 2009-06-26T13:09:13Z |
Hi Daniel,
Thanks again.
Regards,
Jarrod Hollingworth
Complete Time Tracking
http://www.complete-time-tracking.com/
> I'd imagine a design like this:Thank you for your input on this.
> create table tagsIn a multi-user environment I'll have to be prepared for this to fail (two users added the same new tag at the same time).
> (
> constraint un_tags_name unique(name)
> create procedure find_tag(name varchar(255)) returns (id_tagI think you meant "if (:id_tag is null) then".
> integer) as
> begin
> select id from tags where name=upper(:name) into :id_tag;
> if (:id_tag is not null) then
Thanks again.
Regards,
Jarrod Hollingworth
Complete Time Tracking
http://www.complete-time-tracking.com/