Subject | Re: [firebird-support] How to implement a efficient label system? |
---|---|
Author | Anderson Farias |
Post date | 2008-05-24T15:35:02Z |
Hi,
1) use a BIG varchar field on your customer table to store label names like:
'label1;label2;label3'
the bad: cannot use index when searching a label on this column
2) use a master detail setup, with a 2nd table for your labels having 1
label per row, like:
create table customer_labels (customer_code DataType, label DataType);
than you can use an Index but must do a join (not bad, BTW)
Regards,
Anderson Farias
> I need to develop a database to register clients. Each client can haveTwo ways I can come up with:
> zero, one or more assigned "labels".
1) use a BIG varchar field on your customer table to store label names like:
'label1;label2;label3'
the bad: cannot use index when searching a label on this column
2) use a master detail setup, with a 2nd table for your labels having 1
label per row, like:
create table customer_labels (customer_code DataType, label DataType);
than you can use an Index but must do a join (not bad, BTW)
Regards,
Anderson Farias