File in DB or just Path
-
Hi, I know it's not completely related to this section, but I'm developing a silverlight application that is going to get user advertises in image and video format. I'm ambigious about saving the content in db as binary or saving the files and in server hard and just putting the pathes in DB. It shoud has a lot of advertises. Which approach I shoud select?
Best wishes
-
Hi, I know it's not completely related to this section, but I'm developing a silverlight application that is going to get user advertises in image and video format. I'm ambigious about saving the content in db as binary or saving the files and in server hard and just putting the pathes in DB. It shoud has a lot of advertises. Which approach I shoud select?
Best wishes
I'm just finalising my application, lots of photos and forms to be up/down loaded and I'm still ambiguous. I opted for the file path but just ran across an issues where they may want files with the same name, debated moving to the database but decided to prefix the file with the ID from the database instead. I struggled getting the DB operations to be consistently reliable.
Never underestimate the power of human stupidity RAH
-
I'm just finalising my application, lots of photos and forms to be up/down loaded and I'm still ambiguous. I opted for the file path but just ran across an issues where they may want files with the same name, debated moving to the database but decided to prefix the file with the ID from the database instead. I struggled getting the DB operations to be consistently reliable.
Never underestimate the power of human stupidity RAH
Mycroft Holmes wrote:
I'm just finalising my application, lots of photos and forms to be up/down loaded and I'm still ambiguous. I opted for the file path but just ran across an issues where they may want files with the same name, debated moving to the database but decided to prefix the file with the ID from the database instead.
The normal method for doing this is to give each file a unique name (say generated as a GUID), and store the unique name against the original name in the database.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
-
Mycroft Holmes wrote:
I'm just finalising my application, lots of photos and forms to be up/down loaded and I'm still ambiguous. I opted for the file path but just ran across an issues where they may want files with the same name, debated moving to the database but decided to prefix the file with the ID from the database instead.
The normal method for doing this is to give each file a unique name (say generated as a GUID), and store the unique name against the original name in the database.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
I hadn't thought of the guid, I hadn't thought much about it at all which is not good. Prefixing with the record id will at least leave me with a readable file name.
Never underestimate the power of human stupidity RAH
-
I hadn't thought of the guid, I hadn't thought much about it at all which is not good. Prefixing with the record id will at least leave me with a readable file name.
Never underestimate the power of human stupidity RAH
Don't worry about it - you've created a perfectly valid way of making the file name unique. The Guid approach is just one such approach.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
-
Don't worry about it - you've created a perfectly valid way of making the file name unique. The Guid approach is just one such approach.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
Using a GUID for a filename also makes it impossible to identify a file if yuo have to manually wade throuh a directory to find something. 5CAABC01-8A13-4708-AB1F-35A5349C99EC.jpg 05062E0E-9DAD-4aa0-832B-40DB1B8F0F73.jpg Of those two file names, which one is picture of your dog, and which is the picture of some sweet young thing at the beach that your wife doesn't know you snapped a picture of? :)
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001 -
Using a GUID for a filename also makes it impossible to identify a file if yuo have to manually wade throuh a directory to find something. 5CAABC01-8A13-4708-AB1F-35A5349C99EC.jpg 05062E0E-9DAD-4aa0-832B-40DB1B8F0F73.jpg Of those two file names, which one is picture of your dog, and which is the picture of some sweet young thing at the beach that your wife doesn't know you snapped a picture of? :)
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001That's what the database is for.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
-
That's what the database is for.
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
Pete O'Hanlon wrote:
That's what the database is for.
You are starting to sound like SAP/SAS
Thats what the data dictionary is for.
X|Never underestimate the power of human stupidity RAH
-
Using a GUID for a filename also makes it impossible to identify a file if yuo have to manually wade throuh a directory to find something. 5CAABC01-8A13-4708-AB1F-35A5349C99EC.jpg 05062E0E-9DAD-4aa0-832B-40DB1B8F0F73.jpg Of those two file names, which one is picture of your dog, and which is the picture of some sweet young thing at the beach that your wife doesn't know you snapped a picture of? :)
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001Pete may have a point here, my wife has absolutely no idea how a database works.
Never underestimate the power of human stupidity RAH
-
Pete may have a point here, my wife has absolutely no idea how a database works.
Never underestimate the power of human stupidity RAH
I was talking about the files being on disk. If they're actually in the database, you should be safe.
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001