Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7665549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:35:51+00:00 2026-05-31T14:35:51+00:00

If I have to save many strings that are related and that may be

  • 0

If I have to save many strings that are related and that may be dividied in different languages: What’s the best way to do it?

I think I have the following options. Option 1 and 3 is the most clear solution to me. They have more columns, but result in fewer rows.

Option 2 and 4 are the most flexible ones (I could dynamically add new string_x without changing the database). They have only three columns but they will result in many rows.

Option 5 would result in many tables.

Option 1:

id | string_1 | string_2 | string_3 | string_4 | ... | string_n | lang

Option 2 *(where name would be string_1 or string_2 etc.)*

id | name | lang

Option 3

id | string_1 | string_2 | string_3 | string_4 | ... | string_n
id | lang     | stringid

Option 4

id | lang | stringid
id | name

Option 5

id | string_1 | lang
id | string_2 | lang
id | ...      |lang

I’m using it to store precached html values for multiple views (one line view, two lines, long description, etc.), if this is of interest.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T14:35:52+00:00Added an answer on May 31, 2026 at 2:35 pm

    Option 1 and 3 are not recommended, as you end up with the language (which is data) in the field name. You have to change the database design if you want to add another language.

    Option 5 is not recommended, as you end up with the string identifider (which is data) in the table name. You have to change the database design if you want to add another string.

    Option 2 or 4 would work fine. Option 4 is more normalised, as you don’t have duplicate string names, but option 2 might be easier to work with if you enter values directly into the table view.

    Having many rows in a table is not a problem, that’s what the database system is built for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

what is the best way to save a list of strings to the settings
I have many DIV with the same class name, let save wmplayer. I want
I have a folder save here: C:\MyFiles And in that folder I have a
I have many different 3 axis sensors I am writing test code for. In
I have a huge list containing many strings like: ['xxxx','xx','xy','yy','x',......] Now I am looking
We have a mongo collection that can be search&sorted on many fields. For example
I have a DataMapper many to many relationship, friends, that needs to be kept
I have an NSMutableArray with 24 strings. I need to save this data if
I have a Page (form) that has many UserControls on it, and I'm trying
I have some users that can have many posts , and each of those

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.