Welcome Guest, Not a member yet? Register   Sign In
best way to store data in db
#9

[eluser]jedd[/eluser]
I think perhaps you are confused about terminology.

If you have a record for each setting, you'll have 50 rows, and that number might grow.

Your table will have a fixed number of columns - probably 3, maybe one or two more, but it won't grow dynamically.

Another option you didn't mention, but given you are unclear about your design it might be worth considering - have all your settings in a big php array, that you serialise before inserting into the database. This works really well if you're happy to pull out ALL the configuration data whenever you need ANY of the configuration data. In reality this is a relatively modest cost, but it depends on how your system is structured. If every user that hits the system pulls this data out, though, this might not be the best performance option. Maybe a hybrid approach, but the added complexity there probably isn't worth the bother (either).

Given you'll be updating the system settings infrequently, I wouldn't be too worried about looping through dozens of iterations of updates (though there are of course ways to reduce that load) given you'll be doing it rarely. It means you can pull out whichever single config item you need, though, and that's why I'd probably head down that path.

Aside: Do you really have 50+ configuration items for the whole system that you need to be configured via the web interface?


Messages In This Thread
best way to store data in db - by El Forum - 08-20-2009, 03:37 AM
best way to store data in db - by El Forum - 08-20-2009, 05:16 AM
best way to store data in db - by El Forum - 08-20-2009, 06:52 AM
best way to store data in db - by El Forum - 08-20-2009, 07:31 AM
best way to store data in db - by El Forum - 08-20-2009, 11:29 AM
best way to store data in db - by El Forum - 08-23-2009, 02:09 AM
best way to store data in db - by El Forum - 08-23-2009, 03:57 AM
best way to store data in db - by El Forum - 08-23-2009, 05:37 AM
best way to store data in db - by El Forum - 08-23-2009, 07:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB