System settings stored in 1 row table
Posted: Mon Jul 28, 2008 12:41 pm
I'm just looking for a bit of advice here, mainly to do with performance and "bad practices".
I'm currently programming a system which will consist of both Java desktop applications and PHP powered web applications, and they all share one MySQL database.
The whole system has some universal settings, and as of now, I'm storing them in MySQL table with one row - it works fine, but having a table with only ever one row screams bad practice, but I don't know why.
If the system wasn't spread across multiple platforms then the obvious choice would be to put them in a local flat file. The closest I can get to that is putting a flat file on the web server and have the Java application read from that, but it seems overkill when both parties are already interacting with the MySQL database.
What would you do in this situation? Stick with a one-row table? Are there any performance issues or pit-falls that I'm missing here?
I'm currently programming a system which will consist of both Java desktop applications and PHP powered web applications, and they all share one MySQL database.
The whole system has some universal settings, and as of now, I'm storing them in MySQL table with one row - it works fine, but having a table with only ever one row screams bad practice, but I don't know why.
If the system wasn't spread across multiple platforms then the obvious choice would be to put them in a local flat file. The closest I can get to that is putting a flat file on the web server and have the Java application read from that, but it seems overkill when both parties are already interacting with the MySQL database.
What would you do in this situation? Stick with a one-row table? Are there any performance issues or pit-falls that I'm missing here?