Depends what you are after
The core fileapi doesn't care. All it wants to know is where to put and manipulate your file. Actually it doesn't touch the database at all.
update.mpdule in core does have a single sink directory, so it doesn't care about directory structures in db or the filesystem
There are many modules in contrib which do one way or another. Depends on your needs. There were a lot of debates what is the right way to do it, but it seems there isn't a single solution to satisfy all your needs.
http://drupal.org/project/webfm is one such solution.
I'm working on a different one, with a different focus.
http://drupal.org/project/docs
There is a GSOC project focused on this topic.
There are more modules, just check out the file management section in modules
Make your pick.