Re: [PHP-DB] Re: Photo Album Schema
Hi, By saying id.gif, I obviously didn't mean the id of the user, I meant the unique id of the image. I assumed the person making this was going to have one table setup like so: id (unique id) owner name description jpg_or_gif, etc Then a table with authors.. id name pass email etc with author.id = picture.owner I see no downside to doing that and it seems to be a relatively effecient way to ensure the uniqueness of all image names. Best Regards, Bill Zeller --- Sheridan Saint-Michel <[EMAIL PROTECTED]> wrote: > I don't know if having multiple users associated > with a single image is > at all beneficial, and I can see where it might > cause all sorts of problems. > > For example, you and I both have the same image in > our album (we are > both assciated with it in the DB). What happens > when I change the > description? Do you change the description field, > thus changing the > description on both our pages? Do you now have to > create another entry > in your Image table? In effect anytime I change the > description either both > of us have to live with my new description or you > have to do a lot of work > around code (checking to see if more than one person > is associated with the > image, Adding a new entry into image, changing all > my info to reflect the > new > Image_Name) to avoid this. > > Therefore, I think for this project, the original DB > structure works much > better. > > Sheridan Saint-Michel > Website Administrator > FoxJet, an ITW Company > www.foxjet.com > > - Original Message - > From: "grant" <[EMAIL PROTECTED]> > To: "Sheridan Saint-Michel" <[EMAIL PROTECTED]> > Cc: "Bill Zeller" <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]> > Sent: Thursday, August 23, 2001 1:48 PM > Subject: Re: [PHP-DB] Re: Photo Album Schema > > > > The most useful schema would be to have the name > of the document be system > > generated, like i123456789.img and make the > database as follows: > > > > Image > > Image_Name varchar(50) primary key > > Original_Name varchar(50) > > Description text > > > > User > > User_ID int8 primary key > > Login char(8) uniques index > > password varchar(50) encrypted > > > > relation > > User_ID > > Image_Name > > > > Now you have duplicate anems OK, multiple users > associated with any > > picture. You just rename the file as it comes and > goes. > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] > __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Re: Photo Album Schema
"Sheridan Saint-Michel" <[EMAIL PROTECTED]> wrote in message 00f601c12ca3$8bb26420$[EMAIL PROTECTED]">news:00f601c12ca3$8bb26420$[EMAIL PROTECTED]... > From: "Hugh Bothwell" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > > > > "Sheridan Saint-Michel" <[EMAIL PROTECTED]> wrote in message > > 03a901c12c02$c60d4640$[EMAIL PROTECTED]">news:03a901c12c02$c60d4640$[EMAIL PROTECTED]... > > > I don't know if having multiple users associated with a single image is > > > at all beneficial, and I can see where it might cause all sorts of > > problems. > > > > > > For example, you and I both have the same image in our album (we are > > > both assciated with it in the DB). What happens when I change the > > > description? Do you change the description field, thus changing the > > > description on both our pages? Do you now have to create another entry > > > in your Image table? > > > > Just to be nitpicky: I don't see where this would be > > useful - allowing users to share/transfer pictures? - but > > it's not overly difficult either. Just split the information > > between an Image table and an ImageOwner > > table. > > He suggested a DB redesign to allow a Many to > Many relationship between users and images. > I was trying to show that there was no reason to > do so and at least one good reason not to do so =) Yes, I followed that - I'm just playing Devil's Advocate here. I would rephrase your conclusion as 'no reason to do so, but no reason not to if you really feel the need'. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Re: Photo Album Schema
He suggested a DB redesign to allow a Many to Many relationship between users and images. I was trying to show that there was no reason to do so and at least one good reason not to do so =) Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com - Original Message - From: "Hugh Bothwell" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 23, 2001 8:02 PM Subject: Re: [PHP-DB] Re: Photo Album Schema > > "Sheridan Saint-Michel" <[EMAIL PROTECTED]> wrote in message > 03a901c12c02$c60d4640$[EMAIL PROTECTED]">news:03a901c12c02$c60d4640$[EMAIL PROTECTED]... > > I don't know if having multiple users associated with a single image is > > at all beneficial, and I can see where it might cause all sorts of > problems. > > > > For example, you and I both have the same image in our album (we are > > both assciated with it in the DB). What happens when I change the > > description? Do you change the description field, thus changing the > > description on both our pages? Do you now have to create another entry > > in your Image table? > > Just to be nitpicky: I don't see where this would be > useful - allowing users to share/transfer pictures? - but > it's not overly difficult either. Just split the information > between an Image table and an ImageOwner > table. > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Re: Photo Album Schema
"Sheridan Saint-Michel" <[EMAIL PROTECTED]> wrote in message 03a901c12c02$c60d4640$[EMAIL PROTECTED]">news:03a901c12c02$c60d4640$[EMAIL PROTECTED]... > I don't know if having multiple users associated with a single image is > at all beneficial, and I can see where it might cause all sorts of problems. > > For example, you and I both have the same image in our album (we are > both assciated with it in the DB). What happens when I change the > description? Do you change the description field, thus changing the > description on both our pages? Do you now have to create another entry > in your Image table? Just to be nitpicky: I don't see where this would be useful - allowing users to share/transfer pictures? - but it's not overly difficult either. Just split the information between an Image table and an ImageOwner table. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Re: Photo Album Schema
However, the concept of the filename on the drive having nothing to do with the real original useful filename was the real point. You can then save whatever type of file you want, point to it, and tell the user on the other end what to save it as. __ Your mouse has moved. You must restart Windows for your changes to take effect. #!/usr/bin/perl print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10); -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Re: Photo Album Schema
I don't know if having multiple users associated with a single image is at all beneficial, and I can see where it might cause all sorts of problems. For example, you and I both have the same image in our album (we are both assciated with it in the DB). What happens when I change the description? Do you change the description field, thus changing the description on both our pages? Do you now have to create another entry in your Image table? In effect anytime I change the description either both of us have to live with my new description or you have to do a lot of work around code (checking to see if more than one person is associated with the image, Adding a new entry into image, changing all my info to reflect the new Image_Name) to avoid this. Therefore, I think for this project, the original DB structure works much better. Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com - Original Message - From: "grant" <[EMAIL PROTECTED]> To: "Sheridan Saint-Michel" <[EMAIL PROTECTED]> Cc: "Bill Zeller" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, August 23, 2001 1:48 PM Subject: Re: [PHP-DB] Re: Photo Album Schema > The most useful schema would be to have the name of the document be system > generated, like i123456789.img and make the database as follows: > > Image > Image_Name varchar(50) primary key > Original_Name varchar(50) > Description text > > User > User_ID int8 primary key > Login char(8) uniques index > password varchar(50) encrypted > > relation > User_ID > Image_Name > > Now you have duplicate anems OK, multiple users associated with any > picture. You just rename the file as it comes and goes. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Re: Photo Album Schema
The most useful schema would be to have the name of the document be system generated, like i123456789.img and make the database as follows: Image Image_Name varchar(50) primary key Original_Name varchar(50) Description text User User_ID int8 primary key Login char(8) uniques index password varchar(50) encrypted relation User_ID Image_Name Now you have duplicate anems OK, multiple users associated with any picture. You just rename the file as it comes and goes. __ Your mouse has moved. You must restart Windows for your changes to take effect. #!/usr/bin/perl print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10); -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Re: Photo Album Schema
just using id.gif immediately becomes problematic as each user is, by design, going to have multiple images. I know you could add a count to id, or mangle it, or any number of other things. But that takes us back into unnecessary complexity. Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com - Original Message - From: "Bill Zeller" <[EMAIL PROTECTED]> To: "Steve Brett" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, August 23, 2001 10:28 AM Subject: Re: [PHP-DB] Re: Photo Album Schema > Hi, > > I can see absolutely no reason to store the name of > the image with the picture? > > Why not, whether using one directory or one for each > user, just do id.gif? > > Best Regards, > Bill Zeller > --- Steve Brett <[EMAIL PROTECTED]> wrote: > > that would generally work on the assumption that > > many photos can belong to > > many albums. possibly a bad thing. > > > > > table 1 > > > > -userid (primary key) > > > > -username > > > > -password > > > > -album_title > > > > -creation_date > > > > > > table 2 > > > > -photoid (primary key) > > > > -photo (jpg or gif) > > > > -date > > > > -photo_title > > > > -description (limited length) > > > > -userid (foreign key) > > > > would give you 1 album contains many photos, each > > photo relating to one > > album only. > > > > Steve > > > > > > > > "Tatare" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > I'd rather do it like this (but I'm not sure it's > > ok...) > > > > > > table 1 > > > > -userid (primary key) > > > > -username > > > > -password > > > > -album_title > > > > -creation_date > > > > > > table 2 > > > > -photoid (primary key) > > > > -photo (jpg or gif) > > > > -date > > > > -photo_title > > > > -description (limited length) > > > > > > table 3 > > > > -userid (primary key) > > > > -photoid (primary key) > > > > > > reguards. > > > tatare, > > > http://www.memoroo.fr.st > > > (not already available in english - could anyone > > help me to translate it > > ?) > > > > > > Jeff Oien <[EMAIL PROTECTED]> a écrit dans le > > message : > > > > > [EMAIL PROTECTED] > > > > I want to make a photo album that will have > > users who sign up > > > > to create an album and then have the albums open > > to the public. > > > > I was thinking of doing it like this but I've > > never done a relational > > > > database before so if anyone thinks of anything > > I should change > > > > please let me know. Thanks. > > > > Jeff Oien > > > > > > > > Table1: > > > > -username > > > > -password > > > > -album_title > > > > -creation_date > > > > -id > > > > > > > > Table2: > > > > -id (from Table1) > > > > -photo (jpg or gif) > > > > -date > > > > -photo_title > > > > -description (limited length) > > > > > > > > > > > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > To contact the list administrators, e-mail: > > [EMAIL PROTECTED] > > > > > __ > Do You Yahoo!? > Make international calls for as low as $.04/minute with Yahoo! Messenger > http://phonecard.yahoo.com/ > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Re: Photo Album Schema
Hi, I can see absolutely no reason to store the name of the image with the picture? Why not, whether using one directory or one for each user, just do id.gif? Best Regards, Bill Zeller --- Steve Brett <[EMAIL PROTECTED]> wrote: > that would generally work on the assumption that > many photos can belong to > many albums. possibly a bad thing. > > > table 1 > > > -userid (primary key) > > > -username > > > -password > > > -album_title > > > -creation_date > > > > table 2 > > > -photoid (primary key) > > > -photo (jpg or gif) > > > -date > > > -photo_title > > > -description (limited length) > > > -userid (foreign key) > > would give you 1 album contains many photos, each > photo relating to one > album only. > > Steve > > > > "Tatare" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I'd rather do it like this (but I'm not sure it's > ok...) > > > > table 1 > > > -userid (primary key) > > > -username > > > -password > > > -album_title > > > -creation_date > > > > table 2 > > > -photoid (primary key) > > > -photo (jpg or gif) > > > -date > > > -photo_title > > > -description (limited length) > > > > table 3 > > > -userid (primary key) > > > -photoid (primary key) > > > > reguards. > > tatare, > > http://www.memoroo.fr.st > > (not already available in english - could anyone > help me to translate it > ?) > > > > Jeff Oien <[EMAIL PROTECTED]> a écrit dans le > message : > > > [EMAIL PROTECTED] > > > I want to make a photo album that will have > users who sign up > > > to create an album and then have the albums open > to the public. > > > I was thinking of doing it like this but I've > never done a relational > > > database before so if anyone thinks of anything > I should change > > > please let me know. Thanks. > > > Jeff Oien > > > > > > Table1: > > > -username > > > -password > > > -album_title > > > -creation_date > > > -id > > > > > > Table2: > > > -id (from Table1) > > > -photo (jpg or gif) > > > -date > > > -photo_title > > > -description (limited length) > > > > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] > __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Re: Photo Album Schema
that would generally work on the assumption that many photos can belong to many albums. possibly a bad thing. > table 1 > > -userid (primary key) > > -username > > -password > > -album_title > > -creation_date > > table 2 > > -photoid (primary key) > > -photo (jpg or gif) > > -date > > -photo_title > > -description (limited length) > > -userid (foreign key) would give you 1 album contains many photos, each photo relating to one album only. Steve "Tatare" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'd rather do it like this (but I'm not sure it's ok...) > > table 1 > > -userid (primary key) > > -username > > -password > > -album_title > > -creation_date > > table 2 > > -photoid (primary key) > > -photo (jpg or gif) > > -date > > -photo_title > > -description (limited length) > > table 3 > > -userid (primary key) > > -photoid (primary key) > > reguards. > tatare, > http://www.memoroo.fr.st > (not already available in english - could anyone help me to translate it ?) > > Jeff Oien <[EMAIL PROTECTED]> a écrit dans le message : > [EMAIL PROTECTED] > > I want to make a photo album that will have users who sign up > > to create an album and then have the albums open to the public. > > I was thinking of doing it like this but I've never done a relational > > database before so if anyone thinks of anything I should change > > please let me know. Thanks. > > Jeff Oien > > > > Table1: > > -username > > -password > > -album_title > > -creation_date > > -id > > > > Table2: > > -id (from Table1) > > -photo (jpg or gif) > > -date > > -photo_title > > -description (limited length) > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Re: Photo Album Schema
I'd rather do it like this (but I'm not sure it's ok...) table 1 > -userid (primary key) > -username > -password > -album_title > -creation_date table 2 > -photoid (primary key) > -photo (jpg or gif) > -date > -photo_title > -description (limited length) table 3 > -userid (primary key) > -photoid (primary key) reguards. tatare, http://www.memoroo.fr.st (not already available in english - could anyone help me to translate it ?) Jeff Oien <[EMAIL PROTECTED]> a écrit dans le message : [EMAIL PROTECTED] > I want to make a photo album that will have users who sign up > to create an album and then have the albums open to the public. > I was thinking of doing it like this but I've never done a relational > database before so if anyone thinks of anything I should change > please let me know. Thanks. > Jeff Oien > > Table1: > -username > -password > -album_title > -creation_date > -id > > Table2: > -id (from Table1) > -photo (jpg or gif) > -date > -photo_title > -description (limited length) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]