Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2005
    Posts
    3

    Question For professionals only... a challenging question


    Hi all, I am new here and I hope this will be my start with you all.
    I have a question I hope you can answer,


    I am working on a website witch has many sub-websites the problem happened when I was building a database for the mailing list.
    Let me describe the mailing list to show you where the problem is.

    The website has many sub-sites and every visitor can register and choose the sub-site he/she want to receive its messages. The user has an option to receive all sites message in one message I mean all sits he is registered in.
    The problem is how to test witch site the user is registered in, in other words how to build this database.

    Last edited by mcman22; 01-29-05 at 04:02.

  2. #2
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    710
    try this out.
    Attached Thumbnails Attached Thumbnails untitled.JPG  

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    good one, certus

    it also needs a hierarchy, to record the "sub-site" structure
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    I'm curious, what is the challenging part of your question?

    If we understood what part you are having trouble with, it would be a lot easier to focus on that without bothering you with the parts that you already understand.

    I would expect that your instructor has covered all of the parts of this process in class... Were some of the discussions unclear? Did you miss any of the sessions? That kind of information would help me help you with a problem like this.

    -PatP

  5. #5
    Join Date
    Jan 2005
    Posts
    3
    thank you all for your help, i relly appreciate your help.

    my problem is with this:
    *********************
    The user has an option to receive all sites message's in one message, I mean all sits he is registered in.
    *********************

    for example if the user has registered in site1,site2,site6 all the messages will be merged, and will be send as one message.

    my question is how to know witch compinaion of sites did the visitor used when he registered . it my be site1,site2 and site8 OR it my be site1,site6 and site3

    if the user choose the first option –to receive every site message alone- there is no problem, but, if he choose the second option –to receive all messages as one message - I will face a problem.

    I hope this showed you were the challenge is.

  6. #6
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    710
    The model I offered will do.

  7. #7
    Join Date
    Jan 2005
    Posts
    3
    Sorry, to pother you.

    but I do not know that kind of design

  8. #8
    Join Date
    Jan 2005
    Posts
    31
    certus offered the correct design, and graciously provided an excellent graphic of it. It's basic, and describes a set of tables that will handle your need.

    To learn more, please Google the following:

    "Relational Database Design"
    "Database Normalization"
    "1NF 2NF 3NF BCNF 4NF"

    You may also wish to Google about the database product you are using.


    But that aside:

    In certus' design: Simply create one entry in Website for each website you have. Create one entry in Message for each message you have. Create one entry in Customer for each customer you have. In Customer_has_Website, enter the IDs of the records from the other tables, and you will have a list of which customers want which messages from which websites. Personally, I would leave the text of the message back in the Message table, but that's just me.
    Last edited by chris_n_osborne; 01-30-05 at 16:37.

Posting Permissions

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