Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Mar 2009
    Posts
    120
    Thanks
    13
    Thanked 3 Times in 3 Posts

    data storing question

    Okay, this is the table users:

    user_id | password | album


    each user can have his own album, where he can put as many photos (links to images) as he wants. now, what would be the best way to store their album photos? should i create i new table named album or should I store all the photo links in a single record of the 'album' colunm?

    Thing is, if i store all the links to the images in a record, then I wont be able to edit/erase one without erasing the whole record... right?

  • #2
    bdl
    bdl is offline
    Regular Coder
    Join Date
    Apr 2007
    Location
    Camarillo, CA US
    Posts
    590
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Your `users` table should handle user data, e.g.
    `users`
    user_id
    username
    password
    email
    registered_date
    last_login_date
    ...

    Your `album` table should handle the photo data, e.g.
    `album`
    album_id
    user_id --> references `users`.`user_id`
    image_link
    image_meta_data

  • #3
    Regular Coder
    Join Date
    Mar 2009
    Posts
    120
    Thanks
    13
    Thanked 3 Times in 3 Posts
    hmm... yeah, that should get the job done.
    thanks


  •  

    Posting Permissions

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