Forum Moderators: phranque
I am developing a e-catalog on the web for a company where users can find and purchase products.
I use MySQl. I want to store in DB the products images filenames only and store the images themselves on server filesystem in a directory. My boss wants me to store the images themselves on the DB as BLOB. What is your advise on this?
Also, He wants to have two copies of DB, the master copy inside the company firewall that will push data regulary to another DB running on web server outside the firewall. This is the DB the website will query. Again, whats your advise on this?
thanks in advance
Frank
store in DB the products images filenames only and store the images themselves on server filesystem
that's the right way to do it, storing the images just wastes process and makes queries very slow and cumbersome.
As far as backup and publishing from one db to another, it really depends on what you need to do and what is the most efficient for your system and the most intuitive for the people that have to use it. I don't there is a blanket solution.
storing the images just wastes process and makes queries very slow and cumbersome.While it does add overhead, it doesn't add as much as you're implying. For a large number of pictures, the added benifit of ease of maintenance could easily out weight the small increase in system overhead. Besides, if because of site activity the increase causes a problem, upgrading the hardware is probibly more cost effective than the increase in labor costs.
Computers are there to lighten our burden--not the other way around.
web server outside the firewallWho says that the Web server shouldn't be inside the fire wall. To not protect your Web server with a fire wall is asking for trouble. Also, it's possible that the db server can sit on a different machine than the Web server.
There are many levels of security which can be implimented depending on your needs and your budget. From whom or from what are you seeking protection? Answering that question (and don't forget that problems can originat on either side of a fire wall; e.g., Joe Newbie accidentally drops a table) and determing the value of your data should guide you in what precausions you need to take. If you don't know, then it's either time to learn or hire someone who does know, or both.
The bottom line is that there are no right answers. Since we live in an imperfect world, the bst you can due is try to find the right balance between costs (monitary or otherwise) and benifits.
There is a saying: "Build a system which is fool proof and only a fool will want to use it."
My question really was .. how big online selling companies implement their systems.
Do they have one and only one Master DB with all stock inv, billing systems, accounting, users where the websites queries and work with.
Or they have a different or few Master DB somewhere. and the site work only with Views or on Read only data.
thanks again
As an aside, I am not sure why there is a need for two database servers, one behind a firewall, one within, if they both hold the same data.