1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Advise Needed

Discussion in 'Databases' started by scottlpool2003, Nov 26, 2012.

  1. #1
    I'm scripting a website that allows users to upload publications.

    As it stands, the user creates the publication and adds issues into the publication.

    The problem is efficiency, I think its inefficient because users who only want to upload 1 publication rather than issues will have to create it as if its going to contain issues.

    I need the process to be as simple as possible, so the least amount of things the user needs to do to upload a publication the better.

    What I thought was to allow the user to upload a publication and have the title unique to the 'userid'. This would then enable me to check whenever that user uploads a publication if the title exists. I was thinking that if the title exists, I can prompt the user to link the publications and then when I pull out the related issues, I can display them by order of 'issue number'. The problem that this poses is the number of issues and how I link them.
    Is there a more simplistic way I can do this?

    Any advise is really appreciated.
    scottlpool2003, Nov 26, 2012 IP
  2. Rukbat

    Rukbat Well-Known Member

    Likes Received:
    Best Answers:
    Trophy Points:
    "The problem that this poses is the number of issues and how I link them." If you use an integer for the issue number, you can have over 2 billion issues. Even a smallint can have over 32,000.

    How you link them? Each publication (article?) entry in the database has an issue field. If that's null, there's only 1 issue.
    Rukbat, Nov 27, 2012 IP
  3. scottlpool2003

    scottlpool2003 Well-Known Member

    Likes Received:
    Best Answers:
    Trophy Points:
    As it stands, that is what I am doing. I have 2 fields:

    I could technically have all publications in 1 table, but I'd like the issues to relate to the title of the publication. How I was going to do it was I upload all of the publications, which wouldn't have been a problem, but I decided to allow users to upload the publications so I need it to be a simple process for them.

    I did think about making the title unique to the user so if for example they upload "Time Magazine" I make it so the user can only upload 1 time magazine, so when they upload, I check to see if it exists against the user_id and if it exists I prompt the user and advise them to add it as an issue. This won't account for spelling mistakes though so I don't see it as a feasible way to do it.

    Another way would be to check if the user has uploaded any publications, if they have create the form and get the user to fill the data for both tables while providing a dropdown for them to add it to "Time Magazine" else allow them to upload the publication singly. Again, the only thing putting me off this is a big form with many fields that could be daunting to the user.
    scottlpool2003, Nov 28, 2012 IP
  4. Anonimista

    Anonimista Peon

    Likes Received:
    Best Answers:
    Trophy Points:
    You could also allow the user to create an issue and let them select to which publication it belongs before upload (a list of publications created by that user and a <new> publication). You can let the user to create an empty publication. (Make user id and publication id a foreign key for your issues table if you want to relate the tables. Is only the user that created the publication allowed to add issues to it?)
    Last edited: Nov 28, 2012
    Anonimista, Nov 28, 2012 IP
    Rukbat likes this.