Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COWell, I would expect it to require more storage for the additional tables and relationships, but perhaps it would be sufficiently offset by not having to repeat the tag words themselves. My actual case may even be a bit more complex. For example, I may have different kinds of tags link platforms, language, libraries, etc. I'm not sure, but this approach should work fine for that too. Thanks.
      singulars
    2. CO@Jonathan Wood - I'm not certain on the overheads for a table however if you use an int for the ID's that's 4 bytes per int so tagarticle contains 8 bytes per line, varchars are 1 byte per character + 2 bytes overhead. Taking the 3 tags on your question my table requires 24 bytes, storing them in a textfield (assuming you use a 1 char delimiter) requires 30 bytes, 2 indices on the tag article columns would likely cancel out against your full text index for searching the tag field.
      singulars
    3. COWell, in addition to the table itself, you'd also have the indexes. But I'm actually more concerned about overhead required to maintain the data. In a text field, you just save the data the user entered. Using multiple tables, you'd have to do several checks on the database: is this tag already defined--create if not, is this article already associated with this tag--create if not. And similar steps to remove a tag. For a db connected to the web, it certainly represents additional workload. That said, I'm still leaning to the approach you suggested. Just wondering about the effects.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload