+ 1

Configuration file for storing Database information

I've seen multiple ways of storing and retrieving data when developing on applications. Databases, basic I/O files, JSON files, XML files etc. So I have a database filled with information and an XML file that controls the configuration of the web service. So I would like to add a configuration file for storing the database's connection/details. Which format would be the most efficient to store this data? Another XML file, JSON file, or a custom library which would read each input line for line?

19th May 2018, 5:09 PM
Limitless
Limitless - avatar
4 ответов
+ 2
In my opinion, I choose JSON except anywhere requires others. With the same amount of information, JSON is shorter than XML. Moreover, JSON is supported by many languages because it is visual and easy to parse.
19th May 2018, 5:28 PM
Nezumi Neko
Nezumi Neko - avatar
+ 1
i think the same data format you'll choose for your database tables, so that you'll need to take care only once about data parsing
19th May 2018, 6:02 PM
seamiki
seamiki - avatar
+ 1
I'm more looking at a configuration file than storing the Database connection data in a database
19th May 2018, 7:47 PM
Limitless
Limitless - avatar
+ 1
i guess then, your best bet is csv if you're using java.
20th May 2018, 11:20 PM
seamiki
seamiki - avatar