An efficient way to store linked files

Let's say we have many files stored in the file system which are referenced in other places like a database. Here in the DB, we will have the file path. However if we don't have a specific methodology to store these files, then accessing them can be less efficient. Means, if we use one folder for all the files where there could be a huge number of files, this can lead to potential issues.…