PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → tagging things
tagging things
Iniciado por guest, 01,dic. 2014 19:03 - 1 respuesta
Publicado el 01,diciembre 2014 - 19:03
Hi all -

Whats a good way to tag things - like Google does with emails, Blogs, etc. I mean from a database stand point. I want to be able to tag something with any number of dif tags. So a separate table entry for each tag attached to the main object being tagged?
Publicado el 01,diciembre 2014 - 19:17
Hi Joel,

This is ultimately the best approach (even a full text index on a column will result in the same thing). You have a table with two columns: tags and IDs the tag refers to. You index both.

- Display: When displaying an ID you can display it's tags very easily.
- Search: This is the fastest to make search. You can have a SQL query that merge both files together. All matching tags return full record then you can apply further search criterion on other fields. You can match many tags (inclusive or exclusive) easily.

Other techniques can work (some more simple) but they usually have too important drawbacks in terms of performance or scalability.

Best regards,
Alexandre Leclerc