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

  • SEARCH
  • Home
  • 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 9155937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:41:01+00:00 2026-06-17T12:41:01+00:00

I am using PHP and MySQL ( via the framework Symfony 2) to create

  • 0

I am using PHP and MySQL ( via the framework Symfony 2) to create a website to show some bikes of my collection. I would like to store as much images as needed for one bike.

So I was thinking that a good way to do that is to have my Bike entity and a Picture entity and to link the Bike entity with the Picture entity by a one-to-many relation.

So, the Picture entity would look like this :

id     bike_id    title   path

Is this the best way to do it ? Thanks a lot for your advice.

EDIT : About storing thumbnails ..
Do we have to store thumbnails version too ? As I will display many pictures in one page, I read that reducing the picture with width and height was a bad practice and it was better to store a reduced version of the picture.

So the Picture entity would rather looks like this ? :

id     bike_id    title    path     path_thumbnail

Thanks again

  • 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-06-17T12:41:02+00:00Added an answer on June 17, 2026 at 12:41 pm

    Yes, though you could
    simplify naming the images and avoid naming conflicts by scrapping path and storing images as {id}.jpg.

    UPDATE – from your edit, I think you miss the point of what I’m saying about naming images. I suggest you don’t store any image or thumbnail URLs at all. Instead, just have a table that looks like:

    Id    BikeId    Title
    277   123       "Cool picture"
    

    Then name all your images and thumbnail files according to their Id. In the above example, the “Cool picture” files could be called /img/277.jpg and /img/277-thumb.jpg.

    That way you don’t have to store lots of file names in the database, and also there won’t be any issues with file names clashing.

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

Sidebar

Related Questions

I would like to do a site in PHP/MySQL using either Drupal/Joomla/Wordpress that allows
Im trying to create a iPhone Objective C login page using PHP/MySQL to authenticate.
I have a MySQL database (currently using phpmyadmin to manage) that I would like
I'm creating an app that gets some values from a mysql database via php.
I'm passing a large dataset into a MySQL table via PHP using insert commands
Using PHP / MySQL all encoded up as UTF, we have recently had to
I am currently using PHP/MySQL and the jQuery timeago plugin. Basically, I need to
I'm using PHP/MySql. If I have two tables (hypothetically) as follows: id name and
i have created a forum using php/mysql and users login through facebook using php
using php and mysql I have two tables, a users table and a profiles

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.