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 815917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:45:16+00:00 2026-05-15T01:45:16+00:00

There are few string lists in my web application that i don’t know where

  • 0

There are few string lists in my web application that i don’t know where to store in DB or just class.

ie. I have 7 major browsers with which users enter the site. I want to save these stats thus i need to create browser column in UserLogin database. I don’t want to waste space and resources so i can save full browser name in each login row. So i either need to save browserID field and hook it up with Browsers table which will store names following db normalization rules or to have sort of Dataholder abstract class which has a list of browsers from which i can retrieve browser name by it’s ID…

The question what should i do ? These few data lists i have contain no more than 200 items each so i think it makes sense to have them as abstract class but again i don’t know whether MS-SQL will handle multiple joins so well. Think of idea when i have user with country,ip,language,browser and few more stats ..

thanks

  • 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-15T01:45:17+00:00Added an answer on May 15, 2026 at 1:45 am

    I have been on both sides of the fence about this.

    My rule of thumb is:

    If one of these lists changes, will I have to do changes to the code, too?

    (e.g..: in your case, if someone writes “yet another browser” tomorrow, will I need to write code that caters for it?)

    If the answer is “most probably yes” or “definitely” you can leave it inside code.
    In all other cases (even just a “maybe, 50%-50%) you better put it in the DB, or at the very least a property file.

    And please consider this, too: if you expect to have to provide statistics based on this data (e.g.: “how many users use Explorer”) you better put it in the DB anyway: it becomes part of your domain data and therefore it must be there.


    About the “domain data” part.

    The information stored in your DB is the “domain data” of your application. It is, in a sense, a (hopefully consistent) representation of what your application is about – it represents the “known universe” for your application.
    If you agree to this definition, then you must also accept that it does not make sense to have 99.9% of your “reality” in the DB, and 0.1% outside of it – if nothing else, it makes some operations cumbersome (if you only store the smallint you can’t create meaningful reports without either post-processing them using the class to decode “1” into “Firefox” or providing some other key for the end-user).
    It also makes impossible for you to leverage some inherent DB techniques like foreign key (if you just use a smallint without correlating it to any other table, who guarantees that “10” is an acceptable value in your domain?)

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

Sidebar

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.