I am working on an image database using MySQL. The database will store records comprising a location for the image on disk as well as other attributes.
Records can be categorized by User and by Category, with a one-to-many relationship in each case, so I will be making tables for both Users and Categories.
However, users will also be able to define virtual directories or folders, for better organization of their images. The images would not actually be stored in user-defined directories, I was thinking instead of simply including "directory" as a row in the Images table, with something like "user_root" being a default.
But it occurs to me that one of the reasons for user-defined directories is so people can browse the images by directories. Supposing a single user might have several hundred images, does it make sense to include this directory attribute as a row in the Images table; or should I define a new table of Folders similar to the Categories table and used in much the same way (for browsing)?
Any thoughts or other ideas on this database design would be welcome.