Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3997590
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:25:14+00:00 2026-05-20T07:25:14+00:00

This is my database design on photo gallery, I like feedback please or what

  • 0

This is my database design on photo gallery, I like feedback please or what can it be improved?

photos_category
- photocat_id (P)
- name
- slug
(5, 'Cars', 'cars')



photos_albums
- album_id (P)
- photocat_id (F)
- name
- description
- active
(20,5,'BMW','Nice BMW cars',1)

photos
- photos_id (P)
- album_id (F)
- image
(33,20,'bmw_car4.jpg')

bmw_car4.jpg is original size and it will be located at:
/gallery/original/bmw_car4.jpg

For frontend (resized):

Thumbnail: /gallery/thumbs/bmw_car4.jpg

Image: /gallery/images/bmw_car4.jpg

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T07:25:14+00:00Added an answer on May 20, 2026 at 7:25 am

    Your design seems quite correct to me :

    • it’s simple and functionnal,
    • there is no duplication of information,
    • and you can, from one object, find its related informations

    I would just, if you plan on having a lot of photos, add some kind of sub-directories scheme, to avoid having too many files in a single directory (/gallery/original/, and the directories for resized images).

    You could add some hashing mecanism, based on the upload date (month or day, depending on the amount of images) of the images, or something like that.

    For example, you could have :

    • /gallery/original/2011/01/ : all images uploaded in january
    • /gallery/original/2011/02/ : all images uploaded in february
    • and so on

    Then, you’ll store the path in your photos table, and not only the file’s name.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say i have a database design like this: for the data: id |
How would I draw up this design in a database? A product can be
I have this database design: **users_tbl** id username name **posts_tbl** id url users_id *FK
this is my database design for a ques n ans page. A user can
As this question is sure to reveal, I'm relatively new to database design. Please
What would be the best way to design this MySQL database? I have cars
I am working on a database design for a basic photo gallery which each
This is more a question of practical database design. I've designed smaller databases before,
This is a general question about mongodb database design, but the reason for my
I'm working on a database design for an e-commerce web application. For this question

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.