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 9120899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:43:58+00:00 2026-06-17T05:43:58+00:00

In my application whenever a user upload a wallpaper,i need to crop that wallpaper

  • 0

In my application whenever a user upload a wallpaper,i need to crop that wallpaper into
3 different sizes and store all those paths(3 paths for cropped images and 1 for original upload wallpaper) into my database.
I also need to store the tinyurl of the original wallpaper(one which is uploaded by user).

While solving the above described problem i come up with following table structure.

CREATE TABLE `wallpapermaster` (
  `wallpaperid` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `userid` bigint(20) NOT NULL,
  `wallpaperloc` varchar(100) NOT NULL,
  `wallpapertitle` varchar(50) NOT NULL,
  `wallpaperstatus` tinyint(4) DEFAULT '0' COMMENT '0-Waiting,1-approved,2-disapproved',
  `tinyurl` varchar(40) NOT NULL
) ENGINE=MyISAM

wallpaperloc is a comma separated field consisting of original wallpaper location plus locations of all cropped instances.

I know using comma separated field considered to be a bad design in the world of relational database,So Would you like to suggest some other neat and efficient ways?

  • 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-17T05:43:59+00:00Added an answer on June 17, 2026 at 5:43 am

    Use a 1:n relationship between the wallpapermaster and a location table.

    Something like this:

    CREATE TABLE wallpapermaster (
      wallpaperid     int unsigned NOT NULL AUTO_INCREMENT,
      userid          bigint NOT NULL,
      wallpaperloc    varchar(100) NOT NULL,
      wallpapertitle  varchar(50) NOT NULL,
      wallpaperstatus tinyint DEFAULT '0' COMMENT '0-Waiting,1-approved,2-disapproved',
      primary key (wallpaperid)
    ) ENGINE=InnoDB;
    
    
    CREATE TABLE wallpaperlocation (
      wallpaperid  int unsigned NOT NULL,
      location     varchar(100) NOT NULL,
      tinyurl      varchar(40),
      constraint fk_loc_wp 
          foreign key (wallpaperid) 
          references wallpapermaster (wallpaperid),
       primary key (wallpaperid, location)
    ) ENGINE=InnoDB;
    

    The primary key in wallpaperlocation ensures that the same location cannot be inserted twice.

    Note that int(10) does not define any datatype constraints. It is merely a hint for client application to indicate how many digits the number has.

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

Sidebar

Related Questions

im trying to make an android application that whenever a user conncects to a
I am making an application. Now what i want is that whenever user Press
I'm working on a web application that need to allow the user to drag
in my google app application, whenever a user purchases a number of contracts, these
I'm trying to implement OpenId login for a web application. Whenever new user who
In my web application I've to keep audit of the user actions. So whenever
I'm trying to write an application that responds whenever the Shift key is pressed,
I am using datatables in my application. Whenever user click on any row I
My web application has to automatically resize iframe tag whenever a user changes his
I've developed a Facebook application using the Facebook C# SDK. Interestingly, whenever the user

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.