Code Comments
Programming Forum and web based access to our favorite programming groups.Hello I am new to MySQL, and would appreciate your advise on what would be the best way to design the following small system (I am using MySQL 5.0) The system has photo albums which have their own data (name, category, submitter, date, number of photos) The system also has photos which have their own data (name, size, width, height, date, submitter...) The photos should be stored once in a big repository. Photos can be assigned to photo albums, in a many-to-many relationship: A photo album may contain multiple photos and a single photo may appear in multiple albums. The system has a set of categories that the albums can belong to. An album must belong to one of the defined categories. I would appreciate your help Thanks ---------------------------------------- The post originated from PHP Freaks: ---------------------------------------- http://www.phpfreaks.com http://www.phpfreaks.com/forums
Post Follow-up to this message-------- Category _ _ _ _Album _ _ _ _ _Contents _ _ _ _ _Photo _ _ Submitter _ _ _ _ _ _ _ _ _ _ _ _id _ _------- _ _albumID _ _ _ _ _ _ _ _ _ _name _ _ _ _ _ _ photoID ------ _id _ id _ _ _------ categoryID _ _ _ _ _ _ _ _ _ _ _ name _ category _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _size _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ width _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ height _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ date _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ submitterID----id _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _name _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _etc -------- I'd go for the structure above. The contents table links the album to the photos in the album hth Barand http://members.aol.com/barryaandrew...agridguide.html easy data tables - and more ---------------------------------------- The post originated from PHP Freaks: ---------------------------------------- http://www.phpfreaks.com http://www.phpfreaks.com/forums
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.