SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2003
    Location
    Mars
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What is the best database design for this solution?

    Hi,

    I have a website at which users will subscribe and then I will send a quote once every day randomly (random quote at random hour)

    I have multiple number of categories for quotes and I don't to send a quote from the same category unless the user is already received one from each category.

    For example, if I have 3 categories:
    day1: I will send a random quote from cat#2
    day2: I will send a random quote from cat#1
    day3: I will send a random quote from cat#3 <-- I don't want to send a quote from cat#1 or #2 here
    day4: I will send a random quote from cat#1
    day5: I will send a random quote from cat#3
    day6: I will send a random quote from cat#2
    etc...

    This will be easy If I send the quotes for all users once a day but I want to run the sending script every one hour. So, one user may receive the quote at 1 PM today and 8 AM tomorrow.
    Also, not all categories can be sent at anytime. Suppose that each category has a specific period (from -> to) at which its quotes can be sent.

    I would like to know what is the best way to design this solution (in general, no need for deep technical details), considering that I will have large number of subscribers.

    Your ideas and thoughts are really appreciated.

    Thanks

  2. #2
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    5,077
    Mentioned
    103 Post(s)
    Tagged
    0 Thread(s)
    How many quotes will there be in the database, it make a very big difference as to the best method (speed of execution)
    Community Team Advisor
    Forum Guidelines: Posting FAQ Signatures FAQ Self Promotion FAQ
    Help the Mods: What's Fluff? Report Fluff/Spam to a Moderator

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2003
    Location
    Mars
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SpacePhoenix View Post
    How many quotes will there be in the database, it make a very big difference as to the best method (speed of execution)
    About 200-300


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •