Click here to Skip to main content
13,045,285 members (55,054 online)
Rate this:
Please Sign up or sign in to vote.
See more:

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 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 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 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 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 11-Mar-13 8:15am
which disk does it get saved to when deployed and available on the net?
Richard MacCutchan 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 11 Mar 2013
Copyright © CodeProject, 1999-2017
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