Often, when I need to save system properties, such as administrator information, versions, etc., I use a flat file (database.properties, init.properties, etc.). This seems common in other programs that I see and use daily.
Sometimes a flat file is not ideal for a number of reasons. Deploying a web application to multiple clients is often fraught with limitations. In these cases, I use a database table to store information. For example, let's say I have some admin data that I want to save, and maybe some features of my environment. I could do something like this:
property_entry_table
[id, scope, refId, propertyName, propertyValue, propertyType] 1, 0, 1, "DB_VER", "2.3.0", "FLOAT" 2, 0, 1, "LICENCE", "88475", "INT" 3, 0, 1, "TOP_PROJECT", "1", "INT" 4, 0, 1, "SHOW_WELCOME", "F", "BOOL" 5, 0, 1, "SMTP_AUTH", "SSH", "STRING" 6, 1, 1, "ADMIN_ALERTS", "T", "BOOL"
I understand that this interrupts SQL input and allows all types of types to be stored as strings. Is this good practice or am I doing it wrong?
If not, how should I store this type of information?