View Full Version : Resource files vs Database

08 Dec 2010, 04:04 AM
I build WEB application using MVC.
It will support multi-language(more than 10 languages)

I decided to store the localized data(captions for labels, buttons...) in DB.
When application is started, all localized data, according to selected language, is loaded to the cache(this avoids multi requests to DB).

Because of caching, I didn't felt(at least until now) the load on SQL server or IIS.

I thought about using .resx files and my questions are:
1 - Are using resources files better then using DB if thinking about performance issue?
2 - Will I fill the load on SQL server or IIS in the future?

P.S.: I know that one of the differences of using resources files vs DB that resources files must be recompiled each time I change the content of it.

Thank you

10 Dec 2010, 06:09 AM
You need to be careful using flat files because of concurrent users. If the file is updated by 2 users simultaniously then you will end up with lost or corrupted data.