Re: Re: Photo Album Schema

From: Date: Thu, 23 Aug 2001 18:38:16 +0000
Subject: Re: Re: Photo Album Schema
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-11743@lists.php.net to get a copy of this message
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" <grant@amadensor.com> To: "Sheridan Saint-Michel" <webmaster@foxjet.com> Cc: "Bill Zeller" <billzeller@yahoo.com>; <php-db@lists.php.net> 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.

« previous php.db (#11743) next »