• Post Reply Bookmark Topic Watch Topic
  • New Topic

Best approach in storing public data  RSS feed

 
John Astralidis
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

couple of months ago I started a project where a DB receives simultaneous CRUD operations from multiple clients. The middle-tier will be a restful webservice written in java.
The DB stores products from a warehouse. Each product has its own datasheet (pdf file).

I would like to ask:

1) Where to save the pdf file? The best is the user to upload it to web-service and the web-service to store in its filesystem?
2) I want user to be able to backup/restore db data. This will be a .sql file. If my assumption in the previous question is correct then this applies here too? Or to let user store the backup file to his PC filesystem? What is best?

Thank you.

P.S.: Mods> I'm sorry for bad topic title. Please update if necessary.
 
Stephan van Hulst
Saloon Keeper
Posts: 7962
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John,

You can store the files as a BLOB with the Product in the database.
 
John Astralidis
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stephan van Hulst wrote:Hi John,

You can store the files as a BLOB with the Product in the database.


Hi Stephan,

I thought of that, but I was aware of the potential size of the DB file and if that could emerge deficiency of response effectiveness on the DB engine though the network.

Is it or not a minor matter ?
 
Dave Tolls
Ranch Foreman
Posts: 3056
37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Astralidis wrote:
Hi Stephan,

I thought of that, but I was aware of the potential size of the DB file and if that could emerge deficiency of response effectiveness on the DB engine though the network.

Is it or not a minor matter ?


Depends on the database.
Most of them store the actual LOB data in a separate place, either a file or another table. This means the LOB will have little effect on the performance of the main tables themselves.

I prefer (personally) storing them with the db as they will get backed up with the db and you don't have to think about maintaining the link between the db and something on the file system.
 
Stephan van Hulst
Saloon Keeper
Posts: 7962
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most DBMSs are very good at what they do: managing data. You can be pretty sure that they will employ all sorts of intelligent tricks to stay responsive.

Even so, a data sheet per product doesn't sound like an exorbitant amount of data to me.
 
John Astralidis
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much gentlemen for your replies.

I'll go on with this approach.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!