Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Store data in masterdb as string or id of detail table?

$
0
0

Hi all,

Here is the situation,

Lets say I need to store State and Country data in a DB.

As you know I can store it as String as is, like (California /USA) or I can store it as States's Table ID and Countries' table ID (14/81)

The thing is the stored data is only one word and I don't want to store it as id (and get it with join).

Because in SPA application it is hard to construct a page from json data (you need to store id in a hidden input and send it etc. etc.)

What do you think?

Should I afraid of using strings  to store State/Country data? Because in 10 years record count can be million and that time strings can occupy lots of space and blow the db?

thanks


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>