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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:44:32+00:00 2026-05-13T22:44:32+00:00

ENVIRONMENT: C# I have a table of equivalent values, like this: CHEVR = CHEVROLET

  • 0

ENVIRONMENT: C#

I have a table of equivalent values, like this:

CHEVR = CHEVROLET
MERCE = MERCEDES
ALFA = ALFA ROMEO
[...]

I have this data in a tab delimited file.

I also have a table with about 15M rows, which contains informations about car parts. One of these is the first row from the equivalent values table (CHEVR, MERCE, ALFA, etc…).
Ex:

ID         NAME          MODEL          ORD
1         PART 1         CHEVR         0001
2         PART 2         MERCE         0002
[...]

THE AIM:
I need to generate a new table by joining the two tables and replace the short name of the car model to the long one:

ID        NAME         MODEL              ORD
1         PART 1        CHEVROLET         0001
2         PART 2        MERCEDES          0002

QUESTION:
What is the best (optimal) way to store the first table (equivalent values) as I go through the car parts table with a while cicle and I don’t want to open the file and search for the SHORT NAME in each step (15M times).

In PHP for example you can store arrays like: $arr[‘CHEVR’] = “CHEVROLET”; This would be the best way in PHP. Which is it in C#?

  • 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-13T22:44:32+00:00Added an answer on May 13, 2026 at 10:44 pm

    You can use Dictionary where the key is the short name and the value is the full name. The access to each item is O(1) amortized.

    var map = new Dictionary<string, string>();
    map.Add("CHEVR", "CHEVROLET");
    
    string fullName = map["CHEVR"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(Using Oracle) I have a table with key/value pairs like this: create table MESSAGE_INDEX
I have a custom table-environment defined with \newenvironment. I have a caption in this
I have a table on my QA Environment. I want to copy the data
I have lots of tables with statistical data (environment related) and wondering if there
Is it possible for the apache2 user, http, to have environment variables like normal
I'd like to store the Tomcat v5.5 port in an environment variable and have
Background I have a table set up in a SQL Server environment that contains
Working environment is SQL Server 2000. I have a table with no indexes, no
i have a table view containing multiple tabs, on this tabs i want to
I have a table (2 million rows) in Informix v11.10, replicated (50+ node) environment

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.