I am working on digitizing old photographs, articles, ephemera, etc. related to my town's history, and I've been tasked to put these scans I've made onto a website for the public to see. There are several hundred scans that need to be made and was wondering if this is the right approach when working with the metadata for this project. I'm also planning on hosting the images separate from the database in a cloud-based file storage so that I'm able to retrieve them from there.

files: Stores information relative to the file itself.

image_properties: Stores properties of each scanned image.

image_content: Stores content of image.

subjects: The amount of subjects varies where each image might have different subject headings or a different amount of them.

image_subjects: image_content and subjects table are referenced in this table in order to ensure normalization.

Since this is still in a work in progress, I would like your guys' insight on what I could do better or what to change or avoid.enter image description here

2 Answers 2


I would do away with the database altogether and think of a way to store the image metadata in either EXIF or XMP data alongside or inside the image itself.

For searching through the images, I would index the metadata in a system that is purpose-built for searching through this kind of structured data, such as elasticsearch, or a similar system. Of course, setting up such a system isn't as straightforward as a plain old sql database, so I would certainly look to a managed cloud service for the hosting.

Hope this helps, I know it's not really what you wanted to hear but as a general rule, I don't think SQL databases are well suited to this task without something like EAV-style schemas, and really what's the point when there are purpose-built formats already.

  • Thanks for letting me know about this. I've been looking into elasticsearch and have also been practicing a lot with django on the side, so I was thinking about integrating elasticsearch into it for the project. As for the hosting component, I'll look into that. Thank you! :)
    – EdmundF
    Commented Dec 13, 2023 at 21:51

You should consider using an existing content management system instead of basically rolling your own. Most have functionality for managing media, including analysis and maybe indexing of metadata.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.