1 Replies - 425 Views - Last Post: 08 April 2012 - 02:31 PM

how to classify the uploaded document's

hi!! i need to add feature of uploading documents in my website but the problem is.
how should i classify or separate those documents... ie.whether they are horror book,comedy book etc....

i have created separate tables for these doc's so, as soon as those doc's are classified their data would be stored into d/b......

and also,how should i store the name of doc's in d/b ie. should i hash them or keep the name in plain text... which one would be more efficient which would help in searching the doc.if hashing then how should i implement it....

can someone please guide me with the above issues... i have never done these thing's before..

Replies To: how to classify the uploaded document's

Re: how to classify the uploaded document's

Posted 08 April 2012 - 02:31 PM

1) In the form where you upload the document, have them choose which category it should go in. For instance if I am submitting a horror book, I should chose "horror" from a drop down before I am allowed to submit. You can't really tell from the file name unless they specifically put in "horror" somewhere. So just have them choose their category.

2) As for how to store their names, store them in plain text. Unless of course there is a reason you want to obscure their names. Searching would be easier because it would look for actual names. You really only hash things when you want to hide the value and don't care to reverse it back into the original value.

For instance if I have the name my_horror_book.doc and HYEHQ38D7A3... which one is easier to search for the keyword "horror" in?

Nothing you have told me so far would suggest hashing anything. You could hash the contents of the book if you need to compare it to an existing version of the book to know if there was a version change.