Click here to Skip to main content
11,790,904 members (66,139 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: Java SQL

Im creating a site for a record company that enables users to upload their demos to the site. and when googling around the issue i find that most ppl frown against storing the files in the database.

My question is what alternatives do i have to storing the actual file in the database considering the fact that i must be able to retrieve the file from where ever its stored so the clerk may be able to view or listen to it when ever.

Kind Regards.
Posted 10-Mar-13 23:57pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Set up a storage location to hold all the files in a server, could even be the same system that holds the database. Then you just need to store the location of each file in the database for quick access.
mlingo209 at 11-Mar-13 6:06am
Okay this might sound stupid but do you have any links to tutorials that might show me how to do that ? because I'm honestly clueless.
Richard MacCutchan at 11-Mar-13 6:22am
Clueless about what? Do you know how to store a file in a directory? Do you know how to put the pathname of that directory into a database record? If the answer is "no" to both of those questions then you need to do some serious studying.
mlingo209 at 11-Mar-13 7:37am
No to the first question what and how do I store in a directory? I'm sure about storing pathname that I can do.
Richard MacCutchan at 11-Mar-13 8:09am
Storing a file in a directory, is just a matter of writing it to disk. Storing its path name is just saving the full text string. What is your difficulty?
mlingo209 at 11-Mar-13 8:15am
which disk does it get saved to when deployed and available on the net?
Richard MacCutchan at 11-Mar-13 8:48am
How can I answer that? It's your project so you need to decide where it gets stored. This is all part of your setup and configuration.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 410
1 ppolymorphe 385
2 Richard MacCutchan 118
3 Jochen Arndt 80
4 Maciej Los 70
0 OriginalGriff 1,329
1 Maciej Los 835
2 ppolymorphe 780
3 KrunalRohit 686
4 CPallini 661

Advertise | Privacy | Mobile
Web04 | 2.8.1509028.1 | Last Updated 11 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100