Coding this website feature. Use a database?

DCypher

Senior member
Oct 8, 2004
320
0
0
Curious about how I should go about doing this?

I want to code a website where family members can go and look at pictures of our extended family. See, I have a whole bunch a old slides from the 40's/50's that I would like to make available to all family members to see, but the thing is I don't know who many of the people are. So......Anyone here know www.facebook.com? I would like to have a feature where a family member could take one of the pictures, click a box around a person's face, and label that person (If you have been to the website, you know what I am talking about). This way, they could, for example, search for all pictures with um... "Mary Geary", and it would pull up all pictures based on whether somebody has labeled this person or not.

So, the names of the people would have to be "attached" to the pictures. Also, I would like to have a comment section under each picture that would also be "attached."

Lastly, I would like to eventually build an interactive family tree where members can go and build there own branches, but when you click on the name, it'll bring up a page where all the thumbnails of that person are, and when you click on a thumbnail, it'll take you to a page with a blown up picture and the comment section.

Ok, so should (is it possible/recommended) to put the images in an mySQL database. I just think that this would be the most dynamic way, because if I ever want to add something, its easy with a database. Anyways, all advice would be appreciated. Thanks.
 

troytime

Golden Member
Jan 3, 2006
1,996
1
0
database, definately!

images in a database, i wouldn't recommend it.

mysql is certainly fast, but why put something thats static like images there?
Its possible that the features you're looking for (the rectangle frames, like flickr) will benefit from the images being in the database, but i'm not sure. I haven't done a whole lot of image manipulation (aside from resizing, cropping, and some minor color tweaking) with php, but the mini-framing stuff sounds REALLY fun.

what type of experience do you have right now?
 

AFB

Lifer
Jan 10, 2004
10,718
3
0
Firstly, check and see if there's already an extension to a popular photo gallery. If not, totally use a database but keep the images on the disk and simply keep references to them.
 

aCynic2

Senior member
Apr 28, 2007
710
0
0
I don't know how much you thought this through, so here is my thinking (note, I'm not a professional, I just tinker):

A record/row for pics would be something like:

memo field: url or path/filename of pic
memo field: names of people (delimited for parsing).

Another table space listing each person, with mom and dad fields and children in a delimited memo (for parsing).

Then, if you need to find all siblings to name, you'd do a query for all with same mom and dad. You'll need to indicate with somce sort of flag which are half siblings and which are step siblings.

For clicking on a rectangle of the pic, I think that would be simply a hot spot programming.

It's been a while since I did any programming and it was all as hobby, but I learned alot about how to make it happen (but I needed to go to school to understand the details of searching and sorting).
 

Kntx

Platinum Member
Dec 11, 2000
2,270
0
71
Originally posted by: AFB
Firstly, check and see if there's already an extension to a popular photo gallery. If not, totally use a database but keep the images on the disk and simply keep references to them.

Seconded. There's gotta be an existing implementation you can snake.