Suggestions for storing URLS to files
Posted by: Chris Bassett
Date: September 17, 2015 10:55PM

So I'm in the process of creating a database that will reference files on my website. However, the files may be located in various places on my website (sub folders, or in the root web folder, etc).

Which method is more widely accepted?
Storing the filename as one attribute, and the file path as a separate attribute in a table, or storing the filename and filepath as a string/text in a single attribute in a table? Such as:

Table: Files
FileName Text (this would hold both the path and filename)
End Table

--versus--

Table: Files
FileName Text (this holds only the filename and extension; no path info)
FilePath Text (This holds only the path info, ex: /www/pictures/2015/)
End Table


I can see advantages and disadvantage as both, but is one method preferred over the other in database design? (Basically, if you think about it FileName in the first table example would be equal to FilePath + FileName in the second table example.

Options: ReplyQuote


Subject
Written By
Posted
Suggestions for storing URLS to files
September 17, 2015 10:55PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.