Database Snapshots We need to create our database structure. We have many options available to us regarding how we want our images to be organized. I've chosen to go with creating multiple albums, containing multiple images. This will allow for a well-organized gallery, in that we can group related albums together. Our database structure will contain the following tables: Table Name: album Table Name: photo We'll now create our tables using MySQL: CREATE TABLE album ( CREATE TABLE photo ( An example INSERT query may be something like the following: INSERT INTO album VALUES(0, 'Frank's Birthday', 'May contain incriminating photos! :)', 'thumbs/at_the_bar_080103_180743'); INSERT INTO photo VALUES(0, '1st Drink of Many', 'A Drink with Friends!', '2003-08-03 18:07:43', 'photos/ at_the_bar_080103_180743', 'thumbs/ at_the_bar_080103_180743'', 1); Now that our tables have been created, we can worry about the structure of our "back-end interface", which will allow us to upload our images into the chosen album(s).
blog comments powered by Disqus |