...

View Full Version : data storing question



Dhuan
03-28-2009, 10:41 PM
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?

bdl
03-28-2009, 10:51 PM
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

Dhuan
03-29-2009, 12:05 AM
hmm... yeah, that should get the job done.
thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum