Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 361 Vote(s) - 3.51 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Should I store my system's notifications in a db or filesystem?

#1
I'm refactoring an older online catalog system where the various messages sent to users - things like 'Thank you for registering with our store', 'Thank you for your order', 'Your order has shipped' - were all stored as text fields in the database.

It's worked well enough and it's nice to have the CMS subsystem be able to simply pull a db field into a browser-based editor for updates. But a browser-based editor is also a downside if I want a richer editor to handle more complex layout functions.

Should I give consideration to moving the messages to the filesystem and just store a URI in the db?

thx
Reply

#2
It sounds like you're already considering it! :)

Well, doing that will add complexity won't it, because information will have to be looked up. You'll have to look in the database anyway to find where the file is, so what's the point. It'll probably go wonky over time, unless you're very careful, you'll end up with URI's in the database where the file is missing, or files without a URI in the database.

I'm assuming your richer editor works on files, and that's why you're considering switching to file based?

How about, when you get the record out of the db, just extract the data to temporary file then. Then edit it in the rich editor, then when you've finished and saved it, write it back to the db.

To be honest, I don't really know enough to answer this. What editor are you considering using?
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through