Store only part of the folder/file information in DB
My application uses a base-folder where all documents are stored.
The base-folder can have unlimited sub-folders.
The base-folder will never be changed from the moment one document is stored in DB.
The idea is to only store the part of a file's location that extents the base-folder.
Basefolder = C:\MyFolder\
Actual file location = C:\MyFolder\MyFolder\MyFilename.doc
FilenameExt (in DB) = MyFolder\MyFilename.doc
When the existence of the file must be checked I would simple connect the two strings together: basefolder + FilenameExt
1. How can I easily substract the base-folder from a file location when store a single record?
2. How can I easily update existing records in DB where currently the actual file locations are stored (with SQL Server)?