1 Vote Vote

One column SQL table, the column being an ID - is this crazy?

Posted by topdog 331 days ago Questions| null tag int unsigned All

I am designing a database which will be used for internationalized content. One of the features is a tagging system, similar to what Stack Overflow has. This is what I've got:

TABLE tags
tag_id | int(11) unsigned | NOT NULL   | PRI | auto_increment 

TABLE tag_translations
| tag_translation_id | int(11) unsigned | NOT NULL   | PRI | auto_increment 
| fk_language_id     | int(11) unsigned | NOT NULL   | MUL |                
| fk_tag_id          | int(11) unsigned | NOT NULL   | MUL |                 
| tag_name           | varchar(255)     | NOT NULL   | UNI |  

TABLE tag_relationships
| tag_relationship_id | int(11) unsigned | NOT NULL   | PRI | auto_increment
| fk_tag_id           | int(11) unsigned | NOT NULL   | MUL | 
| fk_solution_id      | int(11) unsigned | NOT NULL   | MUL |  

First of all, does it seem reasonable to have that tags table containing nothing but an ID? Second, how could I populate that column with the only field being an auto incrementing ID?

Originally asked by: Calvin Froedge on Stack Overflow

Discuss Bury


Who Voted for this Question