dotnetnoob
dotnetnoob

Reputation: 11330

Best method of storing semi-static data

I need to access some data on my asp.net website. The data relates to around 50 loan providers.

I could simply build it into the web page at the moment, however I know that I will need to re-use it soon, so its probably better to make it more accessisble.

The data will probably only change once in a while, maybe once a month at most. I was looking at the best method of storing the data - database/xml file, and then how to persist that in my site (cache perhaps).

I have very little experience so would appreciate any advice.

Upvotes: 0

Views: 474

Answers (2)

HackyStack
HackyStack

Reputation: 5157

It's hard to beat a database, and by placing it there, you could easily access it from anywhere you wanted to reuse it. Depending on how you get the updates and what DBMS you are using, you could use something like SSIS (for MS SQL Server) to automate updating the data.

ASP.NET also has a robust API for interacting with a database and using it as a datasource for many of it's UI structures.

Upvotes: 1

Charles Bretana
Charles Bretana

Reputation: 146499

Relational databases are tools for storing data when access to the data needs to be carefully controlled to ensure that it is atomic, consistent, isolated, and durable. (ACID). To accomplish this, databases include significant additional infrastructure overhead and processing logic. If you don't need this overhead why subject your system to it? There is a broad range of other data storage options at your disposal that might be more appropriate, but should at least be considered options in your decision process.

Using Asp.Net, you have access to several other options, including text files, custom configuration files (stored as Xml), custom Xml, and dotNet classes serialized to binary or Xml files. The fact that your data changes so infrequently may make one of these options more appropriate. Using one of these options also reduces system coupling. Functions dependent on this data are now no longer dependent on the existence of a functioning database.

Upvotes: 0

Related Questions