For example, there is a table "Welding machines", which characterizes the device by name, color, smell, etc., the device on the page with the description should be attached documentation - a set of files doc, pdf, jpg with the links to them. So, how acceptable is the creation of something like a table "files" in which the names of files associated with the relationship with the corresponding devices will be stored? Just then there is the problem of synchronization of records in the database and the contents of the file system.
- There is no other way in general. Well, that is There is of course, you can store files in the database itself, but imho problems more. As long as they are outside the database, they can be distributed quickly with some kind of ngix. And yes, of course there are problems, you may need servicing scripts looking for inconsistencies. In one system, I have similar files on a disk called based on the object ID and the path is not stored in the database at all, it is calculated and checked for the presence of a file, if there is a link to the client, if not - the dummy is shown - Mike
- oneKeep what you want. Problems with synchronization may or may not be. No one knows what you are going to do with this base and these files - Sergey
|