Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Posts
    3

    Unanswered: Most effective method of managing the data?

    I have a large SQL Database im building, in the database there is a table for each user with certain things listed. One problem is, sometimes in a few collums, there will be like 100things listed, instead of one line.


    For Example:

    Products in that some users will have 1 product like "apples" but others will have many more products.

    What is the most effective way of listing the data? Create new tables? Seperate the products with comma's or spaces?


    How do I do it, and keep the overall db size smaller?

    Thanks

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Mar 2004
    Posts
    3
    What is the most effective way of listing the data in sql server? Create new tables? Seperate the products with comma's or spaces?

    Im trying to list multiple items in 1 collum and key. If you understand what im saying, I know im confusing.

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Originally posted by poweraddict
    What is the most effective way of listing the data in sql server? Create new tables? Seperate the products with comma's or spaces?

    Im trying to list multiple items in 1 collum and key. If you understand what im saying, I know im confusing.
    Why is this so popular...you want rows, not comma separated values...

    http://www.experts-exchange.com/Data..._20904021.html
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  5. #5
    Join Date
    Mar 2004
    Posts
    3
    I dont have an account there, cant afford it.

  6. #6
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Ummm...it's free....

    Only the preimium service costs...

    Anyway...from the post....

    Code:
    You want rows, not comma sepearted values
    
    CREATE TABLE myInterests99(UserId varchar(8), Interest varchar(25))
    GO
    
    INSERT INTO myInterests99(UserId,Interest)
    SELECT 'X002548','Skiing' UNION ALL
    SELECT 'X002548','Hockey' UNION ALL
    SELECT 'X002548','Tennis' UNION ALL
    SELECT 'X002548','Margarittas'
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

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