0 Replies - 476 Views - Last Post: 14 May 2014 - 12:55 AM Rate Topic: -----

#1 rannaot  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 63
  • Joined: 19-August 13

How to store configuration?

Posted 14 May 2014 - 12:55 AM


I have a basic question about the interaction between a C# application and the DB scheme.
In general I wish to store parametrs for the app in the database.

I have few ways I did in the past and I wonder what is the best way:
1. I stored an XML with the configuration on the DB.
2. I stored the data in two tables - one describing the parameters - Param_ID,Name,Desc
And another table storing the values per run/app/User/whatever - Here was a type problem - Run_ID,Param_ID, Double_Val, String_Val,DateTime_val...
so programmer in code have to know the type it expected to get for a different parametr.
3. To avoid the 3 columns per different type, I just stored strings in the DB- so second table was RunID,Param_ID String_Value. Programer got a string than had to know how to parse it.

XML storge won't allow me to use the databse for queries and analysis so when such analysis is required, this is not an option.

How to deal with the field type and cast issues ? are the 2 alternative I mentioned a valid solutions? is there a better one?


Is This A Good Question/Topic? 0
  • +

Page 1 of 1