views:

64

answers:

3

There are 2 types of strings in any website:

  1. Shorter with no formatting (menu items, section titles, labels...).
  2. Longer with formatting (content).

If you have to store these 2 types of strings in 2 different database tables, how would you call these 2 tables?

+2  A: 

In SQL the shorter ones are generally called varchar and the longer ones text.

That's not to say that you'd never put HTML in a varchar, just that text fields are better suited for arbitrary-length strings.

Skilldrick
Sure, I'd definitely use the "varchar" data type for type 1 and the "text" for type 2. What I'm looking for the names of the 2 tables that would store these 2 types of strings.
Emanuil
Why not call one strings and one text?
Skilldrick
@Skilldrick: That's been exactly what I've been planing on calling them. Just wanted to see some opinions before I make my decision.
Emanuil
Ok, cool :) Sorry to have misunderstood your question.
Skilldrick
@Skilldrick: The problem I have with "strings" and "texts" is that a text is basically a string so that's it.
Emanuil
I think as long as you're consistent in your naming it'll be fairly obvious what you mean. But I see your point.
Skilldrick
+1  A: 
  1. Localization strings?
  2. Content

In short, call the tables after their content.

If you have both application texts, content titles and content you might use three tables, "ApplicationTexts", "ContentTitles", "Content".

Albin Sunnanbo
The thing is that the 2nd table also contains localization strings so this wouldn't really work form me.
Emanuil
+3  A: 
  1. Labels
  2. Content
FallenAngel
I like "labels". It might be the best so far. Content is too broad I think, plus I need something in plural. Maybe I'll use "texts" for the second one.
Emanuil
Content is a common word for this type. Maybe PageContent or SiteContent might sound more suitable. But, in my opinion, Content covers all related fileds you told, and apparent enough for people who see the mane and try to guess what it might be store.
FallenAngel